User Input Validation In Survey123

1991
7
01-15-2019 09:45 AM
ChrisSnyder1
New Contributor

Is there a way to validate user input in Survey 123, say I have an ID and I want to validate that the ID matches another value, say an address?  Is this possible to create in the Excel form so that when an online user is entering an ID, the form then says "Address Found" and the address field is populated?  Thank you for your help.  Ismael Chivite

0 Kudos
7 Replies
BrettStokes
Esri Contributor

Hi Chris,

Yes, this is possible using the pulldata() function provided you have a list of IDs with corresponding addresses. You can have a user enter an ID and populate an address field or vice-versa (where the address entered would have to exactly match what is in your list). Refer to the Working with External Content section of the Survey123 documentation or this blog entry by James Tedrick‌ for more information and examples of the pulldata() function.

Hope this helps,

Brett

ChrisSnyder1
New Contributor

Hi Brett,

               Thank you for the reply and quick response.  I suppose I should have been more detailed in my question.  Can the pull data method (or another) be done by validating the data from a feature class, say the ID is in a related table and a feature class but the address is only in the feature class? The user would then input an ID number and the address is verified from a feature class.  Is that possible?  Thank you for your assistance.

0 Kudos
BrettStokes
Esri Contributor

Hi Chris, 

Unfortunately, Survey123 does not currently have this functionality. We have an open enhancement request to extend the pulldata function to work with URIs (including hosted feature services). I've added your use case to this request so you can be kept in the loop on any progress. While we don't have a timeline at the moment, we will be in contact when a beta release is available for testing.

Brett

ChrisSnyder1
New Contributor

Thank you Brett, I appreciate your help and assistance.  I have another question that is related, does the functionality exist within Survey123 to push a survey to 2 separate records?  For instance, a full survey that is applicable to 2 IDs in a related table.  Typically, a survey will publish as one entry in a related table or feature class (unless it has repeats) but what if I want to send the survey results to two separate IDs, is this possible(maybe webhooks)?

-Chris  

0 Kudos
Boke
by
New Contributor

Hello Brett,

I'm just wondering if there is any update that addresses this functionality. I have a survey in which I generate project IDs using Javascript functions from survey123 connect. Now I have another survey which I want to make sure only existing project ID is provided. I am trying to use this as a primary-foreign key in case I decide to use a join/relate in the nearest future. Specifically, I want to be able to check previous submissions to see if a project exists with the ID.

Thanks.

0 Kudos
LeeAllen
Occasional Contributor

I am also curious about data validation.  I have a field for people to enter an email, but I want to validate that only organization emails are used (local government).  So if someone enters an email with different domain than our org domain, it doesn't accept it.  Example - if field is set to only accept emails that end in @localgov.us.  Valid emails would be dave.dave@localgov.us, but not dave.dave@gmail.com.

0 Kudos
ChrisPflugfelder
New Contributor

That's a pretty easy regex statement using survey123 connect.  Look up some formulas and add an expression in your constraint column in the xls form. 

0 Kudos