Editing from Inbox - can I make some fields read-only once they've been previously completed?

398
2
Jump to solution
04-11-2021 06:38 AM
SaraMiller
New Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
JamieLambert
Occasional Contributor III

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

Inbox-Read-Only.png


Hope this helps!

Jamie.

View solution in original post

2 Replies
JamieLambert
Occasional Contributor III

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

Inbox-Read-Only.png


Hope this helps!

Jamie.

View solution in original post

SaraMiller
New Contributor III

Thank you so much, @JamieLambert, that's worked!