Select to view content in your preferred language

Survey123 xlsform pulldata(@layer not working

749
3
Jump to solution
03-22-2024 04:22 PM
SteveBrewer
Occasional Contributor

I am trying to get this work after trying to work with json. Where based on a geopoint question it returns a value. 

pulldata("@layer", "getValueAt", "attributes.Label", "https://agency_name.maps.arcgis.com/home/item.html?id=5fa01c8e666740968c727b8a81f78ef7&view=service", ${Segment_ID_Point})

SteveBrewer_0-1711149405738.png

this is similar too what Ismael posted here

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

SteveBrewer_1-1711149747682.png

 

1 Solution

Accepted Solutions
Chris_976
Occasional Contributor

Hi Steve, my guess would be that

- first : you have in fact to use the REST URL of your layer (don't forget the '/0' at the end), like 

Chris_976_0-1711339724046.png

- second, you have to add a buffer instruction at the end of your URL if you want to capture the label near the point position your users will enter. ("?distance=XXX&units=YOURUNITS"

The help topic might be of help : Formules—ArcGIS Survey123 | Documentation

Have a nice day

 

- - -
Christophe AGNES
GIS Head @ Mayotte's public institution for land and country planning

View solution in original post

3 Replies
Chris_976
Occasional Contributor

Hi Steve, my guess would be that

- first : you have in fact to use the REST URL of your layer (don't forget the '/0' at the end), like 

Chris_976_0-1711339724046.png

- second, you have to add a buffer instruction at the end of your URL if you want to capture the label near the point position your users will enter. ("?distance=XXX&units=YOURUNITS"

The help topic might be of help : Formules—ArcGIS Survey123 | Documentation

Have a nice day

 

- - -
Christophe AGNES
GIS Head @ Mayotte's public institution for land and country planning
SteveBrewer
Occasional Contributor

Thank you Chris we still had some issues with this and after talking with support we decided to go with a geoshape question and ran into this issue. 

TypeError: Cannot read property 'toString' of undefined in expression: pulldata("@layer", "getValueAt", "attributes.Label", "https://services2.arcgis.com/Uq9r85Potqm3MfRV/arcgis/rest/services/SCAT_Segments_Polygon/FeatureServ...", /Scat_Application_v3_0

if you have any advice that would be great thank you for your help!

0 Kudos
Chris_976
Occasional Contributor

Hello Steve, sorry for the delay. I hope you solved this problem since.

It looks like there is a problem in one argument of your formula. If you don't already solved the problem, I suggest you post more informations, perhaps a sample of your .xlsform. It seems that the line you copied is not whole.

- - -
Christophe AGNES
GIS Head @ Mayotte's public institution for land and country planning
0 Kudos