Populate Select_One list from feature service

8314
27
Jump to solution
10-07-2020 05:45 AM
AndrewBowne
Occasional Contributor III

Hello,

Is it possible to populate a select_one list from attributes retrieved from a feature service?  I assume I will need to use a custom javascript function to get the data.  I have been doing a lot of reading and I can't find a definitive answer that says if this is possible or not.  I'd like to pull the values of a two fields.  One field would be the label ("Name") shown on the survey and the other would be the value ("GUID") that would be submitted with the survey.

A second part to this is... If this is possible, can this be executed when the survey opens?   I'd like this list to be the first item a user chooses from when they start the survey.

Thanks!

0 Kudos
27 Replies
by Anonymous User
Not applicable

Hi @RosemaryHatch,

We are planning to support this in one of the next upcoming releases, the main outstanding work is adding support to the web app, so forms that use the search() function working correctly in both field app and web app, and also a few improvements still in progress with the search() feature.

Regards,

Phil.

0 Kudos
RosemaryHatch
New Contributor III

Hi Phil,

Are there any updates to the search functionality? I've seen a couple posts that seem to mention using it, but still haven't seen any documentation.

Thanks,

Rosemary

0 Kudos
by Anonymous User
Not applicable

Hi @RosemaryHatch,

The search() feature is currently only beta and therefore only documented in the Early Adopter Community. This feature will be released in the upcoming 3.13 release, and will be available for both the Survey123 feild and web apps. The online documentation will be updated once 3.13 is released.

For now you can test out the search() feature using the 3.13 beta builds available on EAC.

Regards,

Phil.

0 Kudos
KyleSchultz1
New Contributor II

Yeah, this is in desperate need of some documentation.  I would like to perform the search query using the location and a distance within. According to the beta site this should be possible but can't find anything on how to do it.

0 Kudos
by Anonymous User
Not applicable

Hi @KyleSchultz1,

The search() feature is currently only beta and therefore only documented in the Early Adopter Community. This feature will be released in the upcoming 3.13 release, and will be available for both the Survey123 feild and web apps. The online documentation will be updated once 3.13 is released.

For now you can test out the search() feature using the 3.13 beta builds available on EAC.

Regards,

Phil.

0 Kudos
NirmalOjha1
New Contributor III

Hi @Anonymous User ,

Is there any plan to support search function on featureservice when offline? Something similar to hosted CSV file, where the csv file gets downloaded when the device is online and the csv contents changed. I am looking for something similar where the table contents from the hosted featureservice(table) is downloaded when the device is online so it can be used in offline mode.

Thanks.

 

Nirmal

0 Kudos
by Anonymous User
Not applicable

Hi @NirmalOjha1,

Searching feature services using search() function when offline is not supported, and there are currently no plans to support this in a near future release.

Regards,

Phil.

0 Kudos
HeatherBell
Occasional Contributor

Hi @Anonymous User, 

Is it currently possible to populate a select_one with a list of values pulled from a field in an online hosted feature layer. I don't need to spatially query it, though this looks useful for other applications. I just need the list of text values returned from one field to be used as a list of options in the select_one. I've tried a number of ways using javascript and pulldata() in Survey123 version 3.12 232 but cannot crack the exact method, it seems like it is possible from everything I have read but I can't find this exact method documented without using a spatial query. 

The example would be, we have a hosted online feature layer with a list of projects that will be added to over time. Then we have an assets survey and associated hosted feature layer, where people choose a project name first and then add an asset (point to the map) where. I want the project name in the assets survey to be populated using a select_one list of field values pulled from the projects layer so that it is dynamic. 

Thank you,

Heather

GIS Analyst @ The Rivers Trust
0 Kudos
by Anonymous User
Not applicable

Hi @HeatherBell,

Yes this can be done using the search() appearance direct to a feature layer/table, or you could use linked content to a hosted table or CSV. You will need to be using the latest version 3.13 of Connect and field app for this to work. Refer to following blogs and doc:

https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-...

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformsappearance.htm#ESRI_SECTION1_46A7...

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformessentials.htm#ESRI_SECTION1_34A4D...

Regards,

Phil.

0 Kudos
HeatherBell
Occasional Contributor

Hi  @Anonymous User, 

Great, thank you for the swift response. I'll see if I can figure it out with these documents.

All the best!

Heather.

GIS Analyst @ The Rivers Trust