Create Relationship Table for Inspections with data already on AGOL

1198
3
04-15-2020 04:30 AM
MalcolmMeyer2
Occasional Contributor II

I need to add a related table for field inspections to a layer that has already been uploaded to AGOL with editing privileges. My thought is to do the following process. I wonder if someone could give advise if any of this would break things on the feature service in some way.

  1. Turn off editing on the feature service temporarily.
  2. Download the entire feature service as a FGDB (~10 layers)
  3. Re-source the ArcGIS Pro map that was the origin of the service definition to this newly downloaded FGDB.
  4. Create the relationship class and table in the extracted database and add the table to the map.
  5. Replace the feature service as I would normally using "Share -> Overwrite Web Layer", but with the re-sourced data - note that the layers in the FGDB have different names than the original FGDB, so that gives me pause...
  6. I also wonder about GlobalIDs and if they will stay the same when I download/upload the feature service. I will use a "FACILITYID" for the relationship class, but still...
  7. Everything works as expected and I can now create field inspections in Collector with the updated feature service.

 

It would be even better if I could do this in place some how, but I am not sure if that is possible...

0 Kudos
3 Replies
KristalWalsh
Occasional Contributor II

Hi Malcom, I have a similar situation but my project began without using separate inspection tables. It's been an evolution and now with data in my hosted feature layers, I need to move the structure of the project to relationship classes and don't want to lose the existing data. We are using Collector and as I understand it, the Global ID's must be used but I'm still trying to figure out how to make this work with the new inspection table. But if your service is being actively used, I would download the entire project into a file geodatabase working copy. Then make a copy of just one of your feature classes for testing. That is what I am doing but I have the freedom to do that. And you may have found an answer by now - it appears by your last bullet you may have. If so, please share the details about how the global id's worked between the table and feature class. I'm hoping someone #ESRI will respond to yours and others who have posted about created relationship classes from existing data in AGOL to preserve the Global ID's. I found this post about migrating Global ID's for Survey 123, still relevant in some ways. migrating-to-globalid-relationship/td-p/426009  I have not yet been able to find any responses to other posts about AGOL or collector. Thank you, have a great day. Kristal

Kristal Walsh, Florida Fish and Wildlife
Office of Conservation Planning
0 Kudos
KevinMacLeodCAI
Occasional Contributor II

I don't know if this would be the same for AGOL but on Enterprise I just created inspection tables for various utility layers on SDE and we have GlobalIDs on things like manholes, and then in the inspection table you put a field, let's say InspectionID. Make it of the type 'GUID' in Catalog and when you create a new table record it will auto populate the GlobalID from the featureclass. In theory you could use any field not necessarily globalID but that ensures it is unique. (There is also the AGOl setting on a hosted feature layer in its field settings, to require unique values which could be useful)

KristalWalsh
Occasional Contributor II

Hi @KevinMacLeodCAI, thank you for this! I thought I saw a response recently but couldn't find this message. So, I think the problem was not understanding that the auto-populate would only occur when the feature was created in field maps. So I'm good on that now. But our staff will often need to create features in the office and enter attributes in the related tables. Some investigating today leads me to believe they will have to do this from the Smart Editor App. We have used this before for copy/paste functionality but I was hoping it was be a little more streamlined. I need to make sure their workflow is as simple as possible. Before they can begin collecting more data, I have to import existing geometry and attributes from last year's work and I'm faced with the same issue in Pro..kinda scratching my head at the moment.  I think my relationship classes, even though working in Field maps, may need to be attributed. But even then, not sure the GUID will be created here to match the Global ID.  EditingRelatedTables_ArcPro.JPGKristal

Kristal Walsh, Florida Fish and Wildlife
Office of Conservation Planning
0 Kudos