I've created a survey using a parent child relationship between two feature services so that within a given survey the user can create multiple points on the map. My understanding is that this has to be done using the GlobalID which is what I did and it worked great.
I'd like to create a results map showing the surveyors all the points they've made, which would have a point where the survey started from the parent layer, along with multiple points from the child layer. Ideally these points would all have a linking ID in the label or pop-up so that you'd know what child points go with what parent point. I understand the global ID could do this, but I don't know anyone that could match global IDs at a glance, they are not incremental and they look like randomized string text. Is there a recommended workflow for what I am trying to achieve?
I am basically looking for an autoincrementing ID with a one to many relationship between the child and parent layer of my survey. People have suggested the object ID but in my experience that has always been a finicky field and it is not constant. Thanks for any help!
I've done this kind of thing in the past:
One approach might be the OID of the parent plus the OID of the child, with a hyphen between the two.
This means that new records aren't immediately visible in maps/apps, they only become visible once they've been properly processed by the notebook. This may not be suitable if you need realtime or near-realtime visibility of incoming records, but for a lot of applications it should be fine.
If you just want the repeat children to number 1, 2, 3, 4 you can use position() in a calc and once(position()) can help if they navigate the repeat a lot. But note it is not always perfect. If a user goes back a few repeats and deletes a record, then adds a new one at the end you will get dup numbers.
But I would wonder what is this used for. I get people are accustomed to seeing the child numbers in order but it does not really serve a data purpose. In map viewer you can sort the children and all that so not sure you would really need it for anything. Once the data is in AGOL it will have the objectid and it will be sequential.
Me personally I use keys of text that make sense and not globalids. If you ever move the data or have to reload it globalids go bad fast. I created my own second relate as posted here https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...
Hope that helps