How to switch relationship from a Unique ID (integer) to GLOBALID in Survey123 Connect?

307
5
Jump to solution
01-22-2021 11:00 AM
ScottLehto3
New Contributor III

Hi, I have a feature service that i edit that has related tables that uses a unique id that is integer. It has about 10,000 records

In Survey123, relationships using integers are not allowed and i have to use Global ID.

I am looking for directions on how i would make this change to use Global ID. I can see how i can create columns such as a GUID Column, but i don't see how i can populate the GUID Column and maintain my existing parent/child relationship amongst my features.

Just wondering what the best practice is here.

 

Thanks

1 Solution

Accepted Solutions
DougBrowning
MVP Frequent Contributor

Bummer.  123 cannot have 2 fields with the same name in it.

Anyways here is what I do.  I let 123 manage the globalid relationship.  Then I have a second relationship class that uses my own key.  I just pass the value from parent to repeat in the form using calc column.  Then both my relationships just work.  The parent is PointID and repeat is RepeatNamePointID.

But for me we download the feature service at the end of each season.  At that point I can calc RepeatPointID into PointID in the child.  If you are going to leave it in the hosted feature service forever that is harder.  Unless it is a SDE based feature service.  If so you could use Attribute Rules to calc in the key as records are added.

I hope that makese sense and helps you.  I never use globalid in relationships.  Total mess.  See here https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/... 

View solution in original post

5 Replies
DougBrowning
MVP Frequent Contributor

Does your current relationship use the same field name in the parent and child?  Like PlotID and PlotID?  Or are they different like PlotID and TableID?

ScottLehto3
New Contributor III

Thank you Doug for your reply.

 

They are the same. The field name "server_id" is used in the parent table and two related tables. Both related tables are Composite and One to Many.

0 Kudos
DougBrowning
MVP Frequent Contributor

Bummer.  123 cannot have 2 fields with the same name in it.

Anyways here is what I do.  I let 123 manage the globalid relationship.  Then I have a second relationship class that uses my own key.  I just pass the value from parent to repeat in the form using calc column.  Then both my relationships just work.  The parent is PointID and repeat is RepeatNamePointID.

But for me we download the feature service at the end of each season.  At that point I can calc RepeatPointID into PointID in the child.  If you are going to leave it in the hosted feature service forever that is harder.  Unless it is a SDE based feature service.  If so you could use Attribute Rules to calc in the key as records are added.

I hope that makese sense and helps you.  I never use globalid in relationships.  Total mess.  See here https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/... 

View solution in original post

ScottLehto3
New Contributor III

Okay. I think i understand. I will adjust my feature services to not have duplicate names and then i will let Survey123 use the Global ID's and i will try the second relationship as well.

When there are new technologies, there's always caveats.

0 Kudos
ScottLehto3
New Contributor III

One more question, If you have data in your feature service, how do tell Survey123 that its related when you create a new survey from an existing feature service?

0 Kudos