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.
Solved! Go to Solution.
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:
pulldata(@layer)
request parameters documentation.
Formatting urls can be tricky, so take a look at these articles and post back with so examples if you get stuck.
Can you share an example of your search() criteria or an example of your xlsx? That would help trouble shooting.
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:
pulldata(@layer)
request parameters documentation.
Formatting urls can be tricky, so take a look at these articles and post back with so examples if you get stuck.
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?
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.