XLSForm variable only accessible after submission, from CENTRAL or ENKETO

1. What is the issue? Please be detailed.
I would like to use a variable declared in XLSForm, but which will only take its value after submission of the form to be accessible only from CENTRAL, or ENKETO. So I will only be able to display a widget conditionally in RELEVANT with this post-submission variable. Like a flag in programming.
Only administrators and authorized profiles will be able to see the widget in CENTRAL

2. What steps can we take to reproduce this issue?
I was thinking of using instance_name, instanceID or submissionDate
What variable can I use ?

Cordially,

If you need a unique identifier for each submission, you can reference instanceId. What decides the flag? You can use a calculation and it will not be shown to the person filling out the form.

Thanks danbjoseph for your help.

I don't need a unique id, just a flag state change from False to True once the form has been submitted.
It is the fact of having been submitted that the flag of the form changes automatically.
Using CALCULATE, when the form is filled out by the collector, the calculation is done before submission.The result of the calculation or the initially hidden Widget becomes accessible and visible when editing the pending form in ODK-Collect. so this solution is not suitable.

Cordially,

A survey submission (being completed either in the browser with Enketo or in the Collect app) will not be visible in Central until it is submitted. There is no "un-submitted" form state in Central because that state is not possible. Once successfully submitted to Central, a submission will be assigned the "Received" state. See more on this here: https://docs.getodk.org/central-submissions/#submission-review-states

I understood the difference in the state of the form in each part.
I would like to know what is the name of the "Received" State Form viariable that I can use in XLSForm?

Here is an example of what I want:
example.xls (9.5 KB)

In this example the collector does not see the widget "status" . But only in CENTRAL one can modify the value of the widget "status" because the widget "flag" is on Received State Form.

Cordially,

Why do you need to use your variable in XLSForm? The reviewState variable is metadata added when a submission is received by Central.

It is possible to change the Review State inside the Central interface...

Or via the API: https://odkcentral.docs.apiary.io/#reference/submissions/submissions/updating-submission-metadata

Perhaps if you explain in more detail the workflow you want to enable?

I would like the Central admin to be able to change the widget named "status" by opening the form in Enketo. The modification that he will make to the status will thus be directly saved in the form.

In my example I used the status, but it could be any other questions hidden during the collection that only the administrator can modify to be saved directly in the form via Enketo.

So how can one or more widgets of a submission be hidden in Collect, and only visible and modifiable in Enketo ?

I don't think that is possible.

A workaround could be to have a question in the form that asks for the admin "password" and then use relevant to show the admin-only questions if the person enters the right text for the password question.

Or, what about having a separate form that the admin fills out? For example, see the documentation on workflows for Encounters with known entities.