Select to view content in your preferred language

Pulldata GetRecordAt Fails with Service Sublayer

367
13
Tuesday
jfischer91
Regular Contributor

I'm trying to build a survey that will automatically populate the Township, Range, and Section values when the user drops a point. The pulldata returns JSON when querying the main layer, but returns it intermittently with sublayer 1, hardly ever with sublayer 2, and never with sublayer 3, which is the one I need (PLSS Intersected). Example result in screenshot.

I'm new to Survey123 but after watching @IsmaelChivite's tutorial about "GetRecordAt", I tested it with a different layer and it works perfectly. The layer I'm trying to query does have a lot of attributes, that's the only thing I can think that would be different. Query is enabled on both and both are public and accessible. Test layer shown as last record in table.

 

decimalDLatLatitude (DD)round(pulldata("@geopoint", ${location},"y"), 6)
decimalDLonLongitude (DD)round(pulldata("@geopoint", ${location},"x"), 6)
textPLSS_jsonPLSS JSONpulldata("@layer", "getRecordAt", "https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/Public_Land_Survey_System_view/Fe...", ${location})
textGetJSON_TESTTest JSONpulldata("@layer", "getRecordAt", "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Administrative_Divisions/Fea...", ${location})
0 Kudos
13 Replies
DougBrowning
MVP Esteemed Contributor

Try taking that round out of there.  Pulldata really does not like being inside any functions.  Gets posted a lot.  I do not think you would want to round anyway.

0 Kudos
jfischer91
Regular Contributor

Hi @DougBrowning, thanks for responding. I actually haven't had any troubles with the Lat/Lon values, they populate every time. The issue I'm having is with the PLSS_json line. It's also confusing because I can get successful results consistently with a test layer, in the last line, but not the PLSS_json one.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Ok next it could be returning a really long string.  Try setting bind::esri:fieldLength column to something high like 2000.

0 Kudos
jfischer91
Regular Contributor

I hadn't included that in my main post, but it is already set at 2000. Here's a screenshot of the JSON when I use the "/0" layer, instead of "/3".

0 Kudos
DougBrowning
MVP Esteemed Contributor

When I look at that service there is no layer 3?

0 Kudos
jfischer91
Regular Contributor

The link I included is directly to layer 3, this is the link to the main service:

https://services2.arcgis.com/FiaPA4ga0iQKduv3/ArcGIS/rest/services/Public_Land_Survey_System_view/Fe...

0 Kudos
DougBrowning
MVP Esteemed Contributor

Ok I was on the one above.  I wonder if it is the really tight visibility settings?

I would also try even bigger on the size just in case.

0 Kudos
jfischer91
Regular Contributor

What do you mean by "visibility settings"? You mean when each layer is visible? I was wondering if that had something to do with it too, if Survey123 queries layers at a certain scale. But I tried zooming way in on the map when placing the point, and that didn't seem to change anything.

I tried increasing the field size to 5000, that didn't help.

0 Kudos
DougBrowning
MVP Esteemed Contributor

This seems to point to that and makes some sense

Performing an Intersect on a Service:
  • When performing an intersect analysis on a layer service, the resulting layer will inherit the scale visibility settings of the original layer service. 
     
  • If the intersect analysis is performed within the layer's defined scale range, the resulting layer will be displayed. 
     
  • If the intersect analysis is performed outside of the layer's defined scale range, the resulting layer will not be displayed. 
0 Kudos