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.
decimal | DLat | Latitude (DD) | round(pulldata("@geopoint", ${location},"y"), 6) |
decimal | DLon | Longitude (DD) | round(pulldata("@geopoint", ${location},"x"), 6) |
text | PLSS_json | PLSS JSON | pulldata("@layer", "getRecordAt", "https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/Public_Land_Survey_System_view/Fe...", ${location}) |
text | GetJSON_TEST | Test JSON | pulldata("@layer", "getRecordAt", "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Administrative_Divisions/Fea...", ${location}) |
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.
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.
Ok next it could be returning a really long string. Try setting bind::esri:fieldLength column to something high like 2000.
When I look at that service there is no layer 3?
The link I included is directly to layer 3, this is the link to the main service:
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.
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.
This seems to point to that and makes some sense