Survey123 connect Using one answer to autofill another

2381
5
Jump to solution
05-20-2022 09:11 AM
Kjcomp10
New Contributor II

Alright Survery123 community I need your help. 

I am trying to have one survey question answer another survey question from a choice_list or a .csv or even a feature service. 

Here is the situation. 

The survey will ask the users what location they are at. When they answer each location has a specific site code associated to it. I would like the correct site code to auto-populate when the location is selected. 

From what I can find this is possible using the appearance search functionality in the form.

Here is the link to using the search() appearance

I have tried to follow this format but clearly I am doing something wrong. 

search(‘tableName’, ‘searchType’, ‘searchColumn’, ‘searchText’, ‘filterColumn’, ‘filterText’)

Any help would be wonderful.

I have attached the forms below. Since i am doing this wrong I cleared the appearance column out to start over. 

0 Kudos
1 Solution

Accepted Solutions
AndyMcClary
New Contributor III

Hi Ken,

If I'm understanding your question correctly the pulldata() function should do what you want. Try putting something like:

pulldata(Armories, sitecode, name, ${armory})

in the calculate column of the sitecode field and you should be good to go. Documentation on the pulldata function is in the Work with external content section of https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

View solution in original post

0 Kudos
5 Replies
Katie_Clark
MVP Regular Contributor

Hi Ken,

Where is the CSV file located that you are pulling data from? Is it hosted in AGOL? Stored in the media folder?

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
Kjcomp10
New Contributor II

Hey Katherine,

I created the csv and saved it in the media folder.

The other option here is that this information is also in a point feature service in our ArcGIS server which is federated to our portal enterprise. 

0 Kudos
AndyMcClary
New Contributor III

Hi Ken,

If I'm understanding your question correctly the pulldata() function should do what you want. Try putting something like:

pulldata(Armories, sitecode, name, ${armory})

in the calculate column of the sitecode field and you should be good to go. Documentation on the pulldata function is in the Work with external content section of https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

0 Kudos
Kjcomp10
New Contributor II

I will give that a go and let you know if that works out. 

Thank you for the help. 

0 Kudos
Kjcomp10
New Contributor II

Thanks Andy,

pulldata(Armories, sitecode, name, ${armory}) worked great just needed to add ''.

So..

pulldata('Armories', 'sitecode', 'name', ${armory})

I appreciate your help. 

0 Kudos