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
Solved! Go to Solution.
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/...
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?
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.
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/...
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.
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?
@DougBrowning do you have an example of the calculation you used to pass the primary key value from the parent to the repeat? I have two forms connected to the same feature service so I am having a little trouble pass the Parent Primary Key from form 1 to the child primary key in form 2
You don't. Just pass the ID to the parent then use 123 calculation to get it into each repeat.
Parent
PrimaryID field - with value passed in
Repeat
RepeatNamePrimaryID field with a calc of ${PrimaryID}
Hope that makes sense
Ah Thank you @DougBrowning. That makes total sense now!