Select to view content in your preferred language

Pass GlobalID to another field in Survey123 Connect

470
4
Jump to solution
4 weeks ago
AnninaRupe1
Frequent Contributor

I have a very large project in which I have used a feature service GlobalID as a unique identifier for each record. This number gets copied to a field in another feature layer so that they can be related in an Experience. However, whenever I need to update my project and copy all the data we have collected, the GlobalIDs don't persist (it's a known, expected situation--I've talked with Esri support about this and the workaround doesn't work in my case), so I have to manually update them to the new GlobalIDs. 

To help with minimizing the work in the future, I'd like to have Survey123 populate another field in the survey, a hidden field, with the GlobalID, so it persists even when the actual GlobalID doesn't. However, everything I try either doesn't write any value to the field or it throws an error in Survey123 Connect and won't publish.

I feel like this should be very easy, similar to writing "username" to a field. I have done extensive searching and everything I've found has been relating to custom URL parameters. I've tried modifying these solutions to my issue, but nothing is working.

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Not going to work since globalid does not get assigned until the record is pushed up to the service, which makes sense.

I suggest having 2 relates.  One is your own key and the other is the built in 123 that is left alone.  I got a big write up on it here.  We do it in prob 50 forms now.  Works great.  Bit more work to setup but not too bad once you get the hang of it.

https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...

Also as info here are all the reasons I do not use globalid  https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/...

Hope that helps

View solution in original post

0 Kudos
4 Replies
DougBrowning
MVP Esteemed Contributor

Not going to work since globalid does not get assigned until the record is pushed up to the service, which makes sense.

I suggest having 2 relates.  One is your own key and the other is the built in 123 that is left alone.  I got a big write up on it here.  We do it in prob 50 forms now.  Works great.  Bit more work to setup but not too bad once you get the hang of it.

https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...

Also as info here are all the reasons I do not use globalid  https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/...

Hope that helps

0 Kudos
AnninaRupe1
Frequent Contributor

That's a bummer. Since I started this project I have been made aware of all the reasons why GID shouldn't be used. However, when I first started, there was a way to transfer GID so there wasn't a reason to change my workflow, especially since I had a lot of data already collected and working! Since I have to do the transfer manually now, I'll probably just create a new field and assign a unique identifier. I already have a couple relates in my workflow and I'd rather not make it more confusing!

Thanks for the reply.

DougBrowning
MVP Esteemed Contributor

You have to keep the built in 123 ones though or it will not publish.  Got to have both.

0 Kudos
AnninaRupe1
Frequent Contributor

Oh, absolutely! I just won't rely on them as a unique identifier. But that reminds me of the issue I'll still have with moving attachments. Bah! I'll have to dwell on this more.