Collector GlobalID to Survey123 GUID Issues.

1382
1
04-02-2020 12:57 PM
by Anonymous User
Not applicable

So, I'm trying to pass my Global ID in Collector to my GUID field in Survey 123 using the custom URL and I am experiencing a number of issues. I am following the instructions from Pass Global ID from Collector to G but I just can't successfully implement it

My set up is this:

I have a crossing feature class which serves as a kickoff point for my survey. It opens in Collector, has a custom popup to read values from the feature class and sends it to the survey as answers. It reads everything and passes everything except for the GlobalID -> GUID. I am opening my survey through this expression:

Sending values to Survey123:

var openSurvey = "arcgis-survey123://?itemID=######&collector_to_station=" + $feature.GlobalID

return openSurvey

Receiving values in Survey123:

TYPE               NAME                              LABEL                                                BIND:ESRIFIELDTYPE

hidden             collector_to_station          Station ID                                             esriFieldTypeGUID

$feature.GlobalID is the Global ID field from my Crossing feature class. collector_to_station is the esriFieldTypeGUID in my survey. 

I tried sending it to both the Survey123 Field App and the Survey123 Web App but neither of them is reading it. Doing it this way made me notice a couple of differences as well. 

Using the custom url scheme to send it to the Survey123 field app, my url looked this: 

arcgis-survey123://?itemID=######&collector_to_station={F6EFDEB2-281F-47F7-AB0D-D82A25703B54}

Using the custom url scheme to send it to the Survey123 web app, my url looked like this:

https://survey123.arcgis.com/share/#######&field:collector_to_station=%7BF6EFDEB2-281F-47F7-AB0D-D82...

Sending it to the web app automatically encodes it but for Survey123 field app, it doesn't. I read from Pass Global ID from Collector to G that you don't need to remove the curly braces anymore for it to be stored. I still tried both ways but to no avail. Either way, my GUID didn't show up to both the web app and the field app. 

One thing to note is that there is no relation between the Crossing feature class and the survey feature class. I thought that might be the problem so I created related test feature classes (and they have a 1:M relation): parent_point and child_point. parent_point will be my feature class in collector and child_point is used for my survey. parent_point will pass the GlobalID the child_point and will be store in a GUID type field: child_guid. I did the set up and pop up configurations and made it so that it can open the survey in both Field App and Web App.

I was able to send my GlobalID to my GUID in the web app link but I also noticed something. In my earlier example, when I sent my GlobalID to GUID, it was automatically encoded, however, for this test, it wasn't:

I configured my popup like this:

var openSurvey = "https://survey123.arcgis.com/share/651dcc374c484d1b927b11188661a145?field:child_guid=" + $feature.GlobalID + "&field:child_field=" + $feature["parent_field"]

return openSurvey

And it looked like this. The curly brackets remained and wasn't encoded:

https://survey123.arcgis.com/share/651dcc374c484d1b927b11188661a145?field:child_guid={DDBA6C0B-D18A-...

It's weird that this test didn't encode it automatically but the one for my Crossing feature class was encoded. 

And when it comes to the field app, I still can't send my GlobalID to the GUID in my survey.

I have been stuck on this problem for quite some time now and any help is greatly appreciated. 

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

See this post for reasons not to use GlobalIDs for this.

https://community.esri.com/thread/166958 

Hope it helps

0 Kudos