Is it possible to transfer an asset location to geopoint question in Survey123 via URL or any other way?

835
2
Jump to solution
11-01-2018 04:40 PM
deleted-user-SoPilc6QQwEP
New Contributor

Hi, I was wondering if it possible to transfer an asset location to geopoint question in Survey123 via URL or any other way?

I am designing an inspection form for electric assets inspection. I am using URL to transfer some field from assets feature service to Survey123 form. I would like inspections location to be as same as assets.

I have assets Lat & Long fields.

0 Kudos
1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Yes, this is possible. You can click on a feature in a web map/Collector and pass in geometry and attributes to a new survey. To pass in the geometry, you would use the center parameter and coordinates:

arcgis-survey123://?itemID=36ff9e8c13e042a58cfce4ad87f55d19&field:surname=Klauser&center=37.8199,-122.4783,20

Please see the following resource for more information: Integrate with other apps—Survey123 for ArcGIS | ArcGIS 

View solution in original post

2 Replies
JohnathanHasthorpe
Esri Regular Contributor

Yes, this is possible. You can click on a feature in a web map/Collector and pass in geometry and attributes to a new survey. To pass in the geometry, you would use the center parameter and coordinates:

arcgis-survey123://?itemID=36ff9e8c13e042a58cfce4ad87f55d19&field:surname=Klauser&center=37.8199,-122.4783,20

Please see the following resource for more information: Integrate with other apps—Survey123 for ArcGIS | ArcGIS 

deleted-user-SoPilc6QQwEP
New Contributor

Thank Johnathan,

It worked. I used Arcade expression to generate Lat,Long, thanks Kurt for the help with that. Then I embedded them in the URL.

arcgis-survey123://?itemID=4xxxxxxxxxxxxxxxxxxxxxxx&field:FacilityID={FacilityID}&field:LocationID={LocationID}&center={expression/expr2},{expression/expr3}

 

Configure Attribute in Arcade

 

This one is latitude:

{expression/expr3}

//wkid 102100->4326

var g = Geometry($feature);

var lat = g.y/6378137.0;

lat = 90*(4*Atan(Exp(Lat)) - Pi)/Pi;

return lat

 

This one is longitude:

{expression/expr2}

//wkid 102100->4326

var g = Geometry($feature);

var lon = g.x/111319.49079;

return lon