Select to view content in your preferred language

GUID field be replaced by other ID numbers?

1273
4
Jump to solution
01-19-2022 09:36 AM
AmyGrossman
Emerging Contributor

Is it possible to use a personalized number for the GUID field? 

I'm getting started with creating a Survey using Survey123 and connecting the data it collects to a feature layer in Field Maps. One the main steps seems to be linking the two with the GUID number. If this dataset already uses personalized ID numbers for the data being collected, could those numbers be used instead or does it have to be the number generated by the GUID tool? 

Thank you, 

Amy

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ColinLawrence
Esri Regular Contributor

Hi @AmyGrossman ,

You can use your own ID field but this must be established when creating the Relationship class between the layer/table or layer/layer. We recommend using GlobalID/GUID because it is auto generated and guaranteed to be unique. When using your own ID field it is up to the user to populate this field and can lead to errors and broken/orphaned records if the ID is incorrectly entered or not entered at all. 

Regards,

Colin

Regards,
Colin

View solution in original post

4 Replies
MobiusSnake
MVP Regular Contributor

Hi Amy, if you're passing in a GUID as a URL parameter to Survey123 (for example, when launching S123 forms from a Field Maps pop-up), you can apply that value to a GUID field.  I've used this approach to pass a Global ID from a layer in Field Maps to a hidden GUID field within a Survey123 form.  This can be leveraged to create a relationship between a parent layer's record and a new child record within a service, or to maintain a referential value from a record in one service to a record in another service.

ColinLawrence
Esri Regular Contributor

Hi @AmyGrossman ,

You can use your own ID field but this must be established when creating the Relationship class between the layer/table or layer/layer. We recommend using GlobalID/GUID because it is auto generated and guaranteed to be unique. When using your own ID field it is up to the user to populate this field and can lead to errors and broken/orphaned records if the ID is incorrectly entered or not entered at all. 

Regards,

Colin

Regards,
Colin
DougBrowning
MVP Esteemed Contributor

I strongly suggest not to use GlobalID and use your own key like you said.  I manage 160+ relationship classes and using globalid is a nightmare.

See here for all the reasons

https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/... 

This is esp true when using AGOL and then importing into SDE later.

AmyGrossman
Emerging Contributor

Thanks, Doug. We already have created unique identifiers for our data collection so it makes sense to use what is already there. Glad to hear others are doing similar.