I have a survey with repeats which will use the Inbox to edit and add records to the repeat. However, I want to prevent the "metadata" that sits outside the repeat from being edited by subsequent users after the initial submission. I was trying to use an "if" statement in the readonly column, but getting nowhere. XLS form attached.
Fields to become read-only when editing from Inbox:
Region
Site
Other Site Name
Other Site Grid Reference
Platform Name or ID
Platform Map Location
Solved! Go to Solution.
Hi @SaraMiller,
Try using the pulldata("@property", 'mode') function. Example image below - where Question 2 is readonly when the record is opened via the Inbox, and editable in a new survey.
The pulldata("@property", 'mode') function. From the Survey123 documentation (Formulas), "This has three possible values, returning new if the user is producing a new survey response (including one copied from an existing survey), returning edit if the user is editing an existing response, and returning view if the user is viewing an existing response in read-only mode."
This can be used for readonly and relevant. I have used this in forms with a required image questions (for a new survey) that is also edited via the Inbox - Survey123 Image Question: Disable 'Required' in In... - Esri Community
Hope this helps!
Jamie.
Hi @SaraMiller,
Try using the pulldata("@property", 'mode') function. Example image below - where Question 2 is readonly when the record is opened via the Inbox, and editable in a new survey.
The pulldata("@property", 'mode') function. From the Survey123 documentation (Formulas), "This has three possible values, returning new if the user is producing a new survey response (including one copied from an existing survey), returning edit if the user is editing an existing response, and returning view if the user is viewing an existing response in read-only mode."
This can be used for readonly and relevant. I have used this in forms with a required image questions (for a new survey) that is also edited via the Inbox - Survey123 Image Question: Disable 'Required' in In... - Esri Community
Hope this helps!
Jamie.
Thank you so much, @JamieLambert, that's worked!
I am not able to place ${survey_mode} = 'edit' into the readonly field, it fails validation restrictions on the cell, is there another method to set a field to edit just once?
It will yell at you but it does work as long and it is true.