Select to view content in your preferred language

How to create location aware survey in Connect

406
4
Jump to solution
09-05-2025 09:21 PM
SumukhRamesh
Emerging Contributor

I have a requirement of creating location aware choice options based on users location in the field. User will be out in the field collecting address information and would like to see 5 address options based on their GPS location. I have a hosted feature layer with address information that I would use for this.

I came across this post and this video, which talks how you can reference hosted feature layers to populate form drop down values. But the video showcases how to do this using the Web Designer. Is it possible to use connect to do the same.

0 Kudos
2 Solutions

Accepted Solutions
Neal_t_k
Frequent Contributor

You should be able to achieve this.  

One way would be to use the search appearance and formulate your url with with a buffer distance and resultRecordCount as request parameters.

Another way might be depending on your layer, could be to use the point-in-polygon of pulldata(@layer) to return a limiter, and then use that limiter to filter your choice list.  

Dynamic choice list using search appearance:

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

pulldata(@layer)

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye...

request parameters documentation.

https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#reques...

Formatting urls can be tricky, so take a look at these articles and post back with so examples if you get stuck.

View solution in original post

Neal_t_k
Frequent Contributor

Can you share an example of your search() criteria or an example of your xlsx?  That would help trouble shooting.  

View solution in original post

4 Replies
Neal_t_k
Frequent Contributor

You should be able to achieve this.  

One way would be to use the search appearance and formulate your url with with a buffer distance and resultRecordCount as request parameters.

Another way might be depending on your layer, could be to use the point-in-polygon of pulldata(@layer) to return a limiter, and then use that limiter to filter your choice list.  

Dynamic choice list using search appearance:

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

pulldata(@layer)

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye...

request parameters documentation.

https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#reques...

Formatting urls can be tricky, so take a look at these articles and post back with so examples if you get stuck.

SumukhRamesh
Emerging Contributor

Thank you for sharing the links and the tips to create location aware forms. The Point intersects buffered points (with attribute filter) section helped me achieve the user experience I wanted. I have a follow up question. To test the solution, I published a copy of County's Address information as a Hosted Feature Layer. The County has the address information available as a REST service that can be queried. When I tried to use the REST service endpoint as the URL in my search, I got no results. Any idea how I could use the County REST service end point? 

0 Kudos
Neal_t_k
Frequent Contributor

Can you share an example of your search() criteria or an example of your xlsx?  That would help trouble shooting.  

SumukhRamesh
Emerging Contributor

Sorry about the delayed response. After close inspection, I found out that the choice name used in the query for the County REST service had a spell error. After correcting that, the query started working. It's functional now. Thank you very much for the assistance and the quick response to my questions.

0 Kudos