Select to view content in your preferred language

Survey123 with Collector: set geopoint

10612
27
01-13-2017 02:47 AM
Nicole_Ueberschär
Esri Regular Contributor

Hey folks, 

I have a polygon layer in collector to map plots and want to use Survey123 to collect more data to this plot. I managed to open my Survey out of collector with handing over the objectid of my feature to the survey so I can easily join the data later again. I was wondering if I could also hand over the coordinates of the centroid of my polygon to set the geopoint of my survey to have also the survey data in the correct place. 

0 Kudos
27 Replies
ZorbaConlen
Deactivated User

Thanks for the info Michael and Nicole.

0 Kudos
MarcCavallaro
Regular Contributor

I'm trying to pass manhole coordinates to Survey123 but cannot seem to get it to stick.  I have created a DECCOORD field in my manhole feature class containing the coordinates in decimal degrees (39.216150990637,-119.738567302004).  I use the center={DECCOORD} parameter. 

Tested center=39.216150990637,-119.738567302004  and the coordinate is passed and correctly located in the survey.

What am I missing?  Thanks!

0 Kudos
MichaelKelly
Frequent Contributor

I would suggest you pass the {DECCOORD} parameter into a text field (e.g. &field:TextFieldName={DECCOORD}) to see exactly what it's passing (or look at the hyperlink in a feature popup). There is probably something in there that it is not expecting. Either that or there is a syntax error or a misspelling with one of the parameters. What is the full parameter you are using?

0 Kudos
MichaelKelly
Frequent Contributor

It is possible to get the centroid of a polygon via Arcade. So once Collector supports Arcade (see The Aurora Project), you will be able to pass the centroid of a polygon to Survey123 using this method directly after a polygon is created through Collector.

The one caveat is that using the Geometry() function (which is needed to pass in the polygon geometry) as an input to the Centroid() function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Michael, an additional limitation on the technique of using Arcade- the coordinate will be expressed in the coordinate system of the map - the map for that workflow will need to be in a GCS (like WGS 1984, SRID 4326).

NW-AllyBuccanero-GISS
Occasional Contributor

I’ve been struggling to pass on the lat/long of a Collector point to Survey123. I’ve had success with passing straightforward text fields, but I am confused about the exact syntax needed for geometry. After lengthy research and I’ve come across different approaches to this, including using parameters like field:, center, pulldata(), and the use of attribute expressions in popup configurations. I'm not a super savvy coder - there's something I'm missing in how it should be coded, or in the setup of the attribute expression from https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-sche...

   

What I’m looking to do: Take the coordinates from a point in Collector, and pass it to Survey123, where it will overwrite or insert the coordinates for the geopoint survey question.

Here's are some examples of the many combinations I've tried:

arcgis-survey123://?itemID=babe31bcd39b4e6e97642b27d52efcd9&field:PlotNumber={Plot_Number}&field: GeoPtLoc={expression/expr0},{expression/expr1}

or ...center=({expression/expr0},{expression/expr1})

 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Allyson,

For passing from a Collector URL, the center attribute is the appropriate method; this will set the location.  Just use center={Lat},{Lon} where {Lat} and {Lon} correspond to the latitude (Y in DD) and longitude (X in DD).

Just checking, in your example above, you have {expression/expr0} - are you also using Arcade expressions?  That is not supported in the current production version of Collector (I'm not sure if it's in Aurora yet).  Also, there's a limitation in that the shape functions in Arcade produce values in the coordinate system of the map - the map *must* be in WGS84 or another Geographic Coordinate System for Survey213 to receive the values correctly.

0 Kudos
NW-AllyBuccanero-GISS
Occasional Contributor

Thanks for the fast response, James! 

I was attempting the attribute expression from https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-sche... (see below), to try and get lat/long from new points placed on the map in Collector, rather than pulling them from a prepopulated feature class. Is this only applicable to web maps, and not the app? 

If you want to pass lat/lon values from the geometry in a feature, you can add an Attribute Expression to your popup do dynamically get the lat/lon values from the geometry of your feature.
   1) 
Open the 'Configure pop-up dialog of your feature layer's and then select 'Configure Attributes'.
   2) Add a new Attribute Expression.
   3) Look for Geometry under the Globals tab and fetch Geometry($feature).x
   4) Use the Edit link at the top to give your expression a friendly name
   5) Repeat steps 2 through 4 to create a second expression for the y coordinate.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Allyson,

Yes, the instructions you're quoting apply to the web map that Collector uses - this configuration needs to be done in the Map Viewer in ArcGIS Online/ArcGIS Enterprise.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I am getting a weird number with a bad decimal place when using Geometry($feature).y.  I am in WGS84 (4326) and it is a Point FC.  .x does the same thing like -11948017.87617359.  

I just want to pass the lat/long to a note field in Survey123.  I do NOT want to center the geopoint.

Any ideas?

Thanks