Does anyone know if it is possible to auto-populate a geoshape question with the geometry from a hosted feature layer based on the answer to a select_one question?
I want the user to be able to select a building name from a drop-down list and then have the building footprint from a hosted feature layer be that feature's geometry. I.e., instead of drawing a new geometry, it will be auto-populated by pulling in the geometry from the building footprint's feature layer.
All ideas are appreciated, thank you.
Solved! Go to Solution.
Hello @mshanaghan,
This is possible using the pulldata("@layer") function to query the feature service for the geometry then populate a geoshape question with it.
Please check out the Query a feature layer sample in Connect on the third page there is a section that shows populating a geoshape question using pulldata("@layer").
Hello @mshanaghan,
This is possible using the pulldata("@layer") function to query the feature service for the geometry then populate a geoshape question with it.
Please check out the Query a feature layer sample in Connect on the third page there is a section that shows populating a geoshape question using pulldata("@layer").
Yay! Thank you! I got it working.
It is unfortunate that that feature is not supported in the survey 123 web app 😞
Hello @mshanaghan,
This feature is supported in the web designer and the web app. Please see the pulldata("@layer") Esri Community blog for more information.
Oh okay. I only questioned it because this was in the "Query a feature layer" sample:
"Extract the geometry from the returned JSON (not supported in Survey 123 web app)."
Do you have a link for this by any chance?
Hi @mshanaghan,
I also have a need for similar functionality in your original question. Were you able to find a way to get this to work in the web from?
Thanks,
Deric J
Good day, would you kindly share the form if you did manage with the drop-down linked to a geometry? Maivha2006@gmail.com