Hi I am trying to use pulldata(@layer) from an ArcGIS online Neighborhood feature data layer to obtain the neighborhood based on the location provided by a geopoint question. I started with a select one question but it would be easier to select from the existing layer than to create a file of the list of neighborhoods.
I can't seem to get the pulldata to work even though I copied the syntax exactly. There is no error but the neighborhood isn't coming up.
pulldata("@layer","getValueAt","attributes.NeighborhoodName","${layer_url}","${location_xy}")
I don't see what I'm doing wrong. I just started with Survey123 connect so I may be missing something.
I'm using ArcGIS Survey123 XLSForm Template – Advanced, Template version: 3.18, Revision date: 13 June 2023
Solved! Go to Solution.
Sorry I am not experienced is using pulldata against a layer. But I would try having the URL in the call vs as a field.
I have no access to the layer so I cannot test.
So try this
pulldata("@layer", "getRecordAt", "https://services1.arcgis.com/yJ4j7ns7W6juha0m/arcgis/rest/services/Neighborhoods/FeatureServer", ${location_xy})
I am wondering are you putting quotes around the actual field names?
You have "${location_xy}" but that is just a string. You would want ${location_xy}
For example pulldata("PFCSpeciesList", "StabilityClass", "name", ${Species})
Not sure if you just gave that as a sample or that was how you wrote it.
Good catch on the quotes Doug. Thanks! I took them out but the pulldata is not collecting the attribute data. I have a pulldata(@geopoint) earlier in the survey and that's working. But the pulldata(@layer) is not. Is it maybe because I have the pulldata in the calculation column in a select_one question?
Really hard to tell with no form but I would try just a text field to start with to see what it is returning. Could be a token issue or something like that too.
Have you seen this post? https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye...
Sorry I am not experienced is using pulldata against a layer. But I would try having the URL in the call vs as a field.
I have no access to the layer so I cannot test.
So try this
pulldata("@layer", "getRecordAt", "https://services1.arcgis.com/yJ4j7ns7W6juha0m/arcgis/rest/services/Neighborhoods/FeatureServer", ${location_xy})