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?
Brent,
I am just now getting around to this and I am having a hiccup with the process - I can launch a Survey123 form, fill it out, then tap on my hyperlink to transfer the information, Collector Opens up, but I am having an issue with getting the point to be placed and attributes transferred?
I wonder if it has to do with a unique display based on an attribute field; TlmtryPntType? DO I need to fully encode the answers that are being passed also? If so, then I'll need to add in some
Jeff Shaner or Craig Gillgrass do you have any ideas on this one?
Here is my original concat () string below that I was going to use for my hyperlink from Survey123 into Collector to start a new feature and pass attributes. I have taken out the "identifiers" on purpose and replaced with a series of "X".
concat('<a href="arcgis-collector://?itemID=XXXXXXXXXXXXXXXXXXXXXXXX¢er=',${lat},',',${lon},'&featureSourceURL=https://services3.arcgis.com/xyz/arcgis/rest/services/2018_ESI_Mist_Net_Bat_Data/FeatureServer/2&featureAttributes={"ProjectNumber":',${ProjectNumber},'"TlmtryPntType":Telemetry Intermediate Point,"Date":',${FormDate},'"BatID_Freq_Srchd":',${BatFreq_Searching},'}">Link to Collector Telemetry Point</a>')
Here is my revised filly encoded; or possibly not, concat () string.
concat('<a href="arcgis-collector://?itemID=b0a360a4dc8749d9a0d88af86ceafdd5¢er=',${lat},'%2C%20',${lon},'&featureSourceURL=https://services3.arcgis.com/pmvd6IDs5lq7p0BT/arcgis/rest/services/2018_ESI_Mist_Net_Bat_Data/FeatureServer/2&featureAttributes=%7B%22ProjectNumber%22:',${ProjectNumber},'%22TlmtryPntType%22:Telemetry%20Intermediate%20Point,%22Date%22:',${FormDate},'%22BatID_Freq_Srchd%22:',${BatFreq_Searching},'}">Link to Collector Telemetry Point</a>')
Any help would be greatly appreciated as I'm trying to implement this for my field crews this week.
Thank you in advance!
Mike
If you download the webmap it does work offline.
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
Hi Scott,
I did finally figure this out. Basically you have to build the URL within a concat function. The hard part was figuring out all of the html encoding: here is the reference that helped with that:
HTML URL Encoding Reference
Basically I built a Geodabase in Pro with a relationship class built between the survey and the polygon feature and then uploaded it as a AGOL feature service. The relationship was built between a GUID created in Survey123 which is then passed to Collector using the custom URL:
Here is the final statement that I ended up with:
concat('<a href="arcgis-collector://?itemID=00x00xx0x0xx000x0x000000x00x0000&featureSourceURL=https://services6.arcgis.com/ZZZzzZz1zzZZ1zzz/arcgis/rest/services/SPB_S123v1/FeatureServer/2&featureAttributes=%7B%22surveyPointID%22:%22',${pointID},'%22%7D">Create Survey Polygon</a>')
Breaking it down:
'<a href=......</a>' = Hypertext reference
arcgis-collector://?itemID=00x00xx0x0xx000x0x000000x00x0000&featureSourceURL=https://services6.arcgis.com/ZZZzzZz1zzZZ1zzz/arcgis/rest/services/SPB_S123v1/FeatureServer/2 = web map id & polygon feature service url
featureAttributes=%7B%22surveyPointID%22:%22',${pointID},'%22%7D> = write value from Survey123 "pointID" to polygon field "surveyPointID"
translates to: featureAttributes={"surveyPointID""',${pointID},'"}>
Create Survey Polygon = hyper link text in Survey123
Let me know if you have any questions.
Hey Scott,
I have not had the chance to work with this issue, but I have found that they have updated the URL schema for passing information into Collector app. The key will be creating a hyperlink that will concatenate a URL that represents the "expected" URL string that collector is listening for.
Within the link that I provided above; as you scroll down the page to here GitHub - Esri/collector-integration: Multi Language repository that contains documentation and sample code for creating … you will see the URL string that Collector is expecting.
Within this posting I discuss a way to create a URL link to send an email, but you can modify the "Hyperlink" in order to concatenate the sending of data from a Survey123 form into the Collector app.
Not your standard "Note" question; email link
Really take some time to look at the structure of the URL for collector and understand how you can sub in your attribute field names and then the values being passed. You will need to know the URL to the Feature Service Layer along with the data field names (i don not believe you can use the alias field names in passing this information) and the values. When looking at collector you will need to substitute in the question name and then the answers of the questions; similar to my hyperlink for an email.
Quick breakdown of this URL - arcgis-collector://?itemID=5d417865c4c947d19a26a13c7d320323¢er=43.524080, 5.445545&featureSourceURL=http://sampleserver5a.arcgisonline.com/arcgis/rest/services/LocalGovernment/Recreation/FeatureServer/0&featureAttributes={”quality”:2,“observed”:1502917218285}
1502917218285"<CODE>This portion = the unique AGOL identifier for the Hosted Feature service "arcgis-collector://?itemID=5d417865c4c947d19a26a13c7d320323" This is telling the Collector app to start the new feature at this coordinate pair "¢er=43.524080, 5.445545" This is telling collector which layer to start and write the information to; please note that the layer index at the end of the url "&featureSourceURL=http://sampleserver5a.arcgisonline.com/arcgis/rest/services/LocalGovernment/Recreation/FeatureServer/0" These are the attributes being passed "&featureAttributes={”quality”:2,“observed”:1502917218285}" Data field named "quality" and then the value to be written "2" Data field named "observed" and then the value to be written (date in epoch time) "
1502917218285"
Sorry that I cannot provide any further details or example currently as I have been playing catch up for the last month on a high priority project and developing these types of applications for our upcoming field season starting in less then a month.
Give it a shot and let me know if you are still having issue figuring things out.
Good Luck,
Hi Brent, did you ever figure this out?
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!
I might have sometime to play around with this also, but it will not be until after next week during our Holiday shutdown; it's the time that I our company shuts down and I get to develop and test away without interruptions, and if I happen to figure something out, then I'll post to this thread also.
Thanks Tiffany and Mike, I have been working off both the links you sent. Unfortunately neither really explains if there is a way to dynamically write an attribute collected in S123 to Collector. The URL going from S123 to Collector is slightly different than the converse. The GitHub page does show how to write a static value from S123 to the attribute table in collector, which I have been testing so far without success so far. If I get it to work I think I can put something together using concat() to build the link to dynamically pull a value (a GUID) collected in S123 and populate it in the Collector feature, with the ultimate goal of having a relationship class built between the S123 feature and the Collector feature using the GUID. If I am ultimately successful I will share how I did it.
I believe they have updated the GitHub site for the Collector URL schema to include how to pass data into Collector.
GitHub - Esri/collector-integration: Multi Language repository that contains documentation and sample code for creating …
I will be looking into this as well.
Good Luck
Understanding Survey123s Custom Url Scheme
Best post documentation on how to do it so far. My go to.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.