Select to view content in your preferred language

Survey123 pulldata not working

2363
6
Jump to solution
07-21-2023 06:05 AM
Michael_Kleinman
Emerging Contributor

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

 

 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

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})

View solution in original post

6 Replies
DougBrowning
MVP Esteemed Contributor

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.

Michael_Kleinman
Emerging Contributor

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? 

0 Kudos
DougBrowning
MVP Esteemed Contributor

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

0 Kudos
Michael_Kleinman
Emerging Contributor

Here's the form. Basically the pulldata isn't working for me but I don't see what I'm missing. Any help is really appreciated.

0 Kudos
DougBrowning
MVP Esteemed Contributor

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})

Michael_Kleinman
Emerging Contributor

That was it. It selected the neighborhood. I was also using the wrong layer in ArcGIS Online. I changed the layer but it didn't select until I put the URL in the pulldata(@layer) instead of as a field.

Thanks!