AnsweredAssumed Answered

Format for passing values via Attribute Expressions from Collector to Survey123

Question asked by Joseph.Drahos@iowadot.us_IowaDOT on Apr 27, 2018
Latest reply on May 17, 2018 by Joseph.Drahos@iowadot.us_IowaDOT

I have seen some great questions, answers and discussions posted at a few other locations here on GeoNet, but I still have a lingering issue that I am trying to resolve. As a bit of background, I am utilizing the Collector app with prepositioned locations, then using the Collector pop-up to pass values of a particular point into a related Survey123 record. I am currently using two fields stop_lat and stop_lon that have the coordinates (in decimal degrees) and passing these onto the Survey123 app. These fields were populated using the 'Calculate Geometry' tool prior to being published as a Hosted Feature Layer in AGOL. Survey123 accepts these values just fine and automatically places its geopoint on top of the Collector point.

 

The potential issue I need to address, is situations in which the field collectors will need to move the Collector point because it may not be located in the correct spot. If it continues to pass those stop_lat and stop_lon values, Survey123 will place its geopoint at the original coordinates rather than the updated ones.

 

To address this, I used information from a combination of these two resources (understanding-survey123s-custom-url-scheme) and (how-can-i-get-xy-in-dec-degrees-from-a-poly-feat-serv-using-arcade). It gets me to a 90% solution though. I am able to extract the lat/longs from the Collector point geometry and convert to decimal degrees using slightly modified versions of Xander's code. When I look at the hyperlink in my Collector pop-up, it appears to be passing on those values as intended. However, for some reason Survey123 does not appear to recognize them, and places its geopoint at the location that my device's GPS says I'm at.

 

So my thoughts are, that maybe I am using an incorrect format for passing those values calculated in the attribute expressions to Survey123. This is what I am currently using in my Collector pop-up:

 

arcgis-survey123://?ItemID=2b630de13e764c889f6e010246701471&field:globalid={GlobalID}&field:stop_id={stop_id}&field:stop_name={stop_name}&field:agency_id={agency_id}&field:agency_name={agency_name}&field:row={row}&field:city={CITY}&field:district={district}&center={expression/expr1},{expression/expr0}

 

I have looked at the number of decimal places for expr1 and expr0 and they are both set to 8 decimal places; so that isn't the issue. I have tried using the nice titles of the expressions, in my case GeometryY and GeometryX, but those are not recognized at all. Is {expression/expr1} and {expression/expr0} the correct format for centering the Survey123 geopoint?

 

Can anyone spot what my flaw may be?

I'm wondering if maybe I've been looking at it too long and can't see what I am missing.

 

Thank you in advance for the guidance or direction that anyone can provide.

Outcomes