Survey123 URL Parameter that Checks Value of Field

224
2
04-04-2024 09:03 AM
SethStark1
New Contributor II

I have a Survey123 form that is populated when a new work order is created in Field Maps. A field in the survey called "Work Order Status" is set to "Work Order Created" by default.

A link to the Survey123 form for that work order is then emailed to the person responsible for completing the work. They click on the link, enter the date they completed it, and submit.

Once they submit, I have a Power Automate workflow that changes the "Work Order Status" field to "Completed".

My question is: is there a way to check the value of the field "Work Order Status" so that if the worker clicks on the link a second time, they are unable to edit the record? I'd like them to get a message like "This Work Order has already been completed". Is there a Survey123 URL parameter that I can include in the link I send to the worker that would only allow them to edit the record if the status of "Work Order Status" is "Work Order Created"?

I'm not having any luck searching for this issue, so apologies if it's already been discussed elsewhere.

0 Kudos
2 Replies
DuncanC
New Contributor III

There could be a cleaner solution using something I'm not aware of but my initial idea for doing that would be to use a pulldata @layer to put the status into a hidden field and then you can just set a read only based on that field.  Probably throw the entire form into a group so you can use one read only if that works on that survey.

 

0 Kudos
abureaux
MVP Regular Contributor

Easiest is probably pulldata(@layer) and then have conditional things happen. Like, if Work Order Status == Completed, then a warning could popup or fields could become read only.

Essentially, they click the link, and a back end pulldata(@layer) pulls that field each time the survey is loaded. (You just need a unique identifier. I assume you have a unique Work Order Number field though)

Another alternative is the Inbox, but that requires all users to have accounts.

0 Kudos