Select to view content in your preferred language

Pull in geometry from hosted feature layers?

1352
7
Jump to solution
03-06-2023 11:50 AM
mshanaghan
Occasional Contributor

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.   

1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

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").

Thank you,
Zach

View solution in original post

7 Replies
ZacharySutherby
Esri Regular Contributor

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").

Thank you,
Zach
mshanaghan
Occasional Contributor

Yay! Thank you! I got it working.

It is unfortunate that that feature is not supported in the survey 123 web app 😞

0 Kudos
ZacharySutherby
Esri Regular Contributor

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.

Thank you,
Zach
0 Kudos
mshanaghan
Occasional Contributor

mshanaghan_0-1678735190969.png

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)."

 

 

0 Kudos
mikAMD
by
Occasional Contributor III

Do you have a link for this by any chance?

0 Kudos
DJerbCO
New Contributor II

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

RENDANIMUDAU
New Contributor III

Good day, would you kindly share the form if you did manage with the drop-down linked to a geometry? Maivha2006@gmail.com