Select to view content in your preferred language

Survey123 Select One Dynamic Default Selection

4371
13
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? 

13 Replies
BrittneyGibbons1
Regular 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 Esteemed 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
Occasional Contributor

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 Esteemed 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
Frequent Contributor

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
Occasional 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)

MauritsKoenders
Occasional Contributor

Any progress on this? I have a similiar situation.

I'm trying to lookop relevant values in the related tabel of a feature service. I'm using the select_one question together with the search appearance to get the GlobalID from the layer feature. The result is always a single answer and never a list. With this answer, the resulting GlobalID, I can get a filtered list from the related table (again with the select_one question in combination with search appaerance). In the current configuration however, the user should always manually select the resulting GlobalID (which is meaningless and confusing for enduser) from a list of one...DefauIt selection of the first item of the list would be a great outcome.

SimonSchütte_ct
Frequent Contributor

@MauritsKoenders I am not at liberty to share any details here, but you can look forward to the next release, it will provide some new options, that can help with cases you describe. You can join the Early Adopter program to test out new features here: Available Esri Opportunities

0 Kudos
MauritsKoenders
Occasional Contributor

Thnx for the quick reply @SimonSchütte_ct!

Im looking forward to the next release, any idea when it will go live?

0 Kudos