How to validate text entered in survey against a list?

895
3
01-16-2020 04:41 PM
LS1
by
New Contributor III

I have 2 situations in a survey where the user has to call in for an authorization code in order to proceed. Each situation has a list of valid auth codes (attached). How can I make sure that the user has entered a valid auth code? javascript? Help?

Tags (1)
0 Kudos
3 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Lisa,

One workflow for a validation check is to have the list of codes stored as a CSV file attached to the Survey and use the pulldata() function to look up the code and compare the situation it lists to the situation selected

0 Kudos
LS1
by
New Contributor III

Thanks James. I'm not looking up a unique value - isn't that what pulldata is used for? In my survey, there is a 1 to many relationship between the situation that requires an auth code and the valid responses/auth codes. For example, in my survey, if someone shows up to pickup supplies and the pulldata function returns info on that user that they have not attended training, the survey user has to call in to see if the user has attended training and enter an auth code. If HQ says they attended training they will give the survey user 1 of 20 possible uth codes that would be valid in order to proceed with the survey.  How do I check that the auth code exists in that list of 20?  If it's the pulldata function, I'm not sure how to do this?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Lisa,

If I understand you correctly, what I would suggest is to have the table of approved codes attached as a CSV file (with a value of 1 to look up) with the form.  You would then use pulldata to lookup the value based on the code received from the table of codes; if you receive a 1, the user has validated.

0 Kudos