Select to view content in your preferred language

Use list returned by Arcade expression to populate dropdown

1191
5
07-18-2022 02:28 PM
Status: Open
Will_CulturalFire
Occasional Contributor

Would like to write an Arcade query, return a list or dictionary, and use the results to populate a drop down form element. Better if it worked offline, although this seems much more complicated.

Example use cases:

- present a picklist of valid funding codes that is the result of query to a different feature service, filtered to match values provided in form (work type, crew, spatial query). Other service is maintained by a manager via a different app. 

- spatial query of permitting geometry/attributes filters list of available fields for new feature

5 Comments
USFSRegion01

I would like to do this as well.  I was able to replicate this functionality Survey123 connect using the Search appearance, but my current application really needs to use a Form.  

IPWMANGIS

Trying to do the same thing. Has anyone come up with a solution other than S123?

Thanks,
Mike Figuray

ahargreaves_FW

Ditto...

SW-MarieLandisGISS

Ditto. We need this function in wildland fire. We have one large national feature service and fires with not-always-unique names are added daily, in a string field without a domain, because who could keep up with that domain values table? When we are mapping a complex or inherit new fires, we use an incident-specific map with a form that auto-populates the incident name field with the fire. But when we have multiple fires worked by the same group of people, we need to be able to create a drop-down that doesn't include all ten thousand fires currently active in the country, just the 2 or 3 our folks would be working on. 

RaymondCaron_ESRICan

There may be an alternative solution found at example 7 in the following blog written by Doug Morgenthaler  and Jeff Shaner. 

https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-fo...

Here a buffer was used to find a station value at a specific distance. An array was used to capture and organize the results by proximity, however other criteria can be used instead.

For instance, proximity with date may work to automatically return the closest feature, or the newest feature. Or some other criteria to reduce the list of features in the layer to find a specific one.