Custom URL parameters passing value to Collector?

4361
14
12-11-2017 08:38 AM
BrentKinal1
Occasional Contributor III

I've been playing around with linking to Collector from Survey123 and the GitHub documentation for Collector custom URL scheme shows that it is possible to both center on a coordinate and pass static attributes to a layer within a web map in Collector. The GitHub documentation however doesn't show how to pass values collected in Survey123 to Collector, similar to the way values can be passed from Collector to Survey123, just curious if this functionality has yet to be implemented or if someone has an example on how to center the map on the geopoint coordinate and send an attribute (GUID) value collected with Survey123 to a feature in Collector?

14 Replies
by Anonymous User
Not applicable

@UriGilad_EsriAu 

Will this work if I want to pass survey123 data to an existing feature.  Meaning I don't want to create a new feature in collector, I just want the survey to populate a field in an existing feature.

I'm doing a workflow for pump station inspections

Here's what I want to do:

1. User fills out Survey123 for the inspection of Pump Station A, which populates the related Inspection Table in a GDB.  The user fills out the survey and records the gallons of Water Consumed.  

2.  At the end of the survey, I'd like them to be able to pass the gallons of Water Consumed to the pump station feature layer for Pump Station A in a field called "Latest Gallons Consumed" 

 

Is that possible to do?  or is it only possible to create a new feature?

 

Thanks,

Katie

0 Kudos
UriGilad_EsriAu
Esri Contributor

Hi @Anonymous User,

Yes, it's possible. Look for this page for examples:

https://doc.arcgis.com/en/collector/android-phone/help/deploy-map.htm

Here is how it should look like - I color-coded the different components of this sample URL: 

https://collector.arcgis.app?itemID=3ac4145c1ac44aea86e9ed42e00fbb0d&referenceContext=updateFeature&featureSourceURL=https//services9.arcgis.com/QjGvjfQhsHAmqfjP/arcgis/rest/services/DamageAssessment_Apr2018_631d0895e7d3404bb78e8e04e92d896e/FeatureServer/1&featureID=bb0a0c92-9f53-4367-a6a1-bc6edc605be0&featureAttributes=%7B%22incidentid%22:%22527%22,%22inspector%22:%22Frank%20Jones%22,%22inspdate%22:1502917218285%7D

So, if we compare it to the URL that is generated by the script, you need to remove

centre=${location}

and replace it with

referenceContext=updateFeature


Then, after the end of the feature source URL (in pink ...FeatureServer/1), you need to add the &featureID=GlobalID, where the feature's GlobalID is of the feature you're going to edit - pass it from your survey. This must be a GlobalID field. After this bit you specify &featureAttributes just like you would in the scripted URL. This is where you'll pass the gallons of Water Consumed.

Hope this helps, 

Uri

If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.

0 Kudos
ScottKichman
New Contributor III

Hello all, was there every any further action in this thread that was not posted? I am attempting to do exactly the same process.  Thanks!

0 Kudos
DougBrowning
MVP Frequent Contributor

Since there is a URL to the HFS in the call does the call work offline?  Going from Collector to Survey123 does work offline - but from Survey123 to Collector I am not sure if it just uses the URL to figure out the right layer or if it is going out to the net for something?

Thanks

0 Kudos
BrentKinal1
Occasional Contributor III

If you download the webmap it does work offline.

0 Kudos