I have a 'two-part' survey, where users enter one survey connected to one feature layer (hosted) and then submit the second survey from the inbox in the second survey, completing the first part. I recently discovered that some of my users were editing the past submitted surveys (both part one and two) through the survey123 website, I can't disable updates since the users are editing the feature service when they submit the second survey. Is there any way I can disable the survey123 view? I still want them to be able to view their own results through a feature hosted view. If I disable the view option in 'Share results' will this prevent them to view their records through a feature hosted view?
Solved! Go to Solution.
In that case I think you've hit a wall, ArcGIS doesn't have a "no more edits after this point" feature at a low enough level to absolutely prevent tampering. Some half-measures you can try:
It should be possible to do. Try this:
Add a new field to your feature layer called part2_completed. Make it a text or integer field.
In the second survey (the one accessed through the inbox), add a calculate question that sets the value of part2_completed to "yes" when the survey is submitted.
In the first survey (the initial entry form), add a relevant expression to all key questions to hide them if part2_completed is equal to "yes".
Also in the first survey, add a constraint expression to prevent submission if part2_completed is equal to "yes", and include a message like "This record has already been completed and cannot be edited."
Optionally, use the bind::esri:readonly column to make fields read-only when part2_completed is "yes", effectively locking the form.
Republish both surveys.
Now, once a user submits the second survey, the first survey will either hide fields, prevent submission, or become read-only if someone tries to edit the record later—even via the Survey123 website.
You can pop a filter on the Inbox that only allows surveys where a required stage 2 field is null (e.g. date_complete IS NULL or something). Once part 2 is done they shouldn't be able to hop back in there via the Inbox but it'll show up in maps and whatnot.
Thanks! I do have a filter on the Inbox, so they aren't able to edit via the Inbox but my issue is that they are editing through the survey123 website.
In that case I think you've hit a wall, ArcGIS doesn't have a "no more edits after this point" feature at a low enough level to absolutely prevent tampering. Some half-measures you can try:
Ok, thank you for your help!
It should be possible to do. Try this:
Add a new field to your feature layer called part2_completed. Make it a text or integer field.
In the second survey (the one accessed through the inbox), add a calculate question that sets the value of part2_completed to "yes" when the survey is submitted.
In the first survey (the initial entry form), add a relevant expression to all key questions to hide them if part2_completed is equal to "yes".
Also in the first survey, add a constraint expression to prevent submission if part2_completed is equal to "yes", and include a message like "This record has already been completed and cannot be edited."
Optionally, use the bind::esri:readonly column to make fields read-only when part2_completed is "yes", effectively locking the form.
Republish both surveys.
Now, once a user submits the second survey, the first survey will either hide fields, prevent submission, or become read-only if someone tries to edit the record later—even via the Survey123 website.
I think the readonly expressions are not supported in the web app, I was still able to edit through the Survey123 website using just the readonly column. I will try to use the constraint column.
Thanks Deon! I will try making them read-only when they meet that condition.