Survey123 Select One Dynamic Default Selection

1630
6
08-20-2019 08:17 PM
NickolasViau
New Contributor

I have a survey with a select one question that is set up with cascading selects. The choice list for the cascading select is set up such that there will only ever be one choice in the selection. Basically I'm trying to do a field lookup where the user plugs in the name of a site and the next question auto populates with the ID number of that site. The way I'm doing it is when the user selects the site name, the next question for ID num looks to the choices list, where I have a one to one lookup table between site names and ID numbers. The cascading select is working just fine, when I select a site name the ID num question shows a pick list with just one choice for the ID num that corresponds. What I want is for that one choice to be selected by default so the user doesn't have to click/tap to select the one ID num. I tried using the ID num field name as a calculation in it's own question, that didn't work. Is there a way to dynamicaly set the default value to just be the first choice in the list? 

6 Replies
BrittneyGibbons1
Occasional Contributor

I think the pulldata function would do what you are looking for: https://community.esri.com/groups/survey123/blog/2016/10/27/the-pulldata-function-access-external-da... 

0 Kudos
DougBrowning
MVP Notable Contributor

Just make it a calculation instead of a dropdown using Pulldata.  No need for the drop down if you know the answer.

You could also use Collector for the existing feature and just pass the ID to 123.  Keeping a list of assets up the date in the form will become a pain.  Plus then you get a map to find the location.

0 Kudos
MelindaLamb
New Contributor III

I have this same issue and do not want to use pulldata because I'm trying to make a web browser compatible survey. 

0 Kudos
DougBrowning
MVP Notable Contributor

Does webform allow external selects?  I think so but not sure.  If it does you can pulldata against it using itemsets as your file name in the pulldata.

Hope that helps

0 Kudos
AndrewBowne
Occasional Contributor III

Have you ever found a solution for this?  I am trying to do the exact same thing and can't figure it out..

0 Kudos
SMDSAdministrador
New Contributor

This first choice selection possibility would be AWESOME to use in conjunction with the search() function, as it only works with select_one or select_multiple, and the Java Script flow doesn't work for organizations other than the one the search was published in.

I would like to do "online pulldata", from a hosted layer, however, I can't either with search() (unless the user always selects the only option that will appear after being filtered) nor with JavaScript (our forms are shared with logins from other organizations).

Any suggestion would be welcome. (Sorry for the bad English - Google Translate)