Prevent Duplicates During Survey123 Submittal Process

215
4
12-13-2021 02:07 PM
CeydiMendoza
New Contributor

I have a survey that i created connect and i don't want the user to be able to enter the same entity ID in the server.  It is in the system already it should not allow them to enter the same survey entity in again.  all the individuals should be able to do once its entered is update the form.

 

Thank you

4 Replies
JakeMatthys
Occasional Contributor II

I'll be following this topic.  We have a similar issue.  In our workflow, users initiate surveys from Workforce.  We pass the Workforce ID to the survey as a key value.  Currently there is no mechanism to prevent users from submitting multiple surveys with the same key value.  This is a minor issue for us and the constraints that would be needed from a Survey123 perspective to prevent this from occurring could cause issues with other workflows, but I am curious if this is an issue for others.

 - Jake

CeydiMendoza
New Contributor

Hi Jake,

I have not received any answers yet.  still waiting but if I do via here or other means I will definitely will let you know.

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @CeydiMendoza @JakeMatthys

One option would be to use a custom JavaScript function to query the feature service and identify if the record entered matches any records in the feature service. From there you can put a constraint on the question you don't want duplicates to let the user know if that value has been entered already or not. 

We have a JavaScript sample available in Survey123 Connect that demonstrates how to query a feature service.

Thank you,
Zach
0 Kudos
JakeMatthys
Occasional Contributor II

Thanks @ZacharySutherby ,

That seems like a good idea and something we will try.

0 Kudos