Creating new relationship classes with data from existing feature layers

395
4
Jump to solution
02-02-2021 11:19 AM
Labels (1)
KristalWalsh
Occasional Contributor

Hi, I manage a multi-user project which tracks management practices performed on private lands. We started from scratch, not knowing how this would work in AGOL or Collector but now have 9 hosted feature layers containing data which have been working pretty well. Recently I received a request to add a field for contract year because some of the parcels will be managed cyclically, i.e. burned every 2 years. But to account for multiple years of managing one parcel area (portion of a landowner's property), I know no other way to accomplish this except through related tables with a one (area) to many (recurring burns/management practices) cardinality. QUESTION: What is the best approach? Do I separate each feature layer's geometry and attributes manually and then relate them? So far I have not been able to get this to function properly.  Each parcel area record has a global id but how will this be preserved in the relationship class? The GUID field, required for Collector as described in How to Set Up Related Tables for Collector needs to remain blank to successfully create the relate. I also have lists created in the management types to further define the attributes. I have provided a simple sketch of where I am and where I THINK I am headed but I could certainly use some advice before transitioning to Field Maps. Thank you. KristalSketch.JPG

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

Accepted Solutions
DougBrowning
MVP Frequent Contributor

This is never easy to pull off.  In general I prefer the build a new house next to the old one approach.  Then when its done you shut the old down for a day, move it all over, point everyone to the new spot.  Good luck!

View solution in original post

0 Kudos
4 Replies
DougBrowning
MVP Frequent Contributor

I personally never use GlobalIDs for relationships - see my reasons here.  https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/... 

I am honestly not sure what leaving it empty means.  You would need the keys on both sides for anything to work.  I think this says you must fill them in.  "hereas, GUID fields are left blank. The onus is on the user to maintain these fields."  When you do create a related item Collector will add the key for you.  But old data you would have to add it yourself.

I do use related tables a lot in Collector.  See here for more details.  https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...

Hope that helps

KristalWalsh
Occasional Contributor

Thanks for your reply @DougBrowning.  I read through the first set of referenced posts you provided and for all the searching I’ve done in the last few days, I had not found these threads, so much appreciated. These seem to directly contradict the most recent one referenced in my post about using Global IDs. So now I know what NOT to do, and I know I need a unique id but how to begin again? Data is still being collected in this project as it functions currently with Collector.  I saw reference by @bsanders69 on creating a rule on a uid and using a SQL sequence, so that this is an auto-incrementing field. I will look for more information on how to create this rule but first I need to separate all the feature layer geometries from their tables.  This seems overwhelming, any advice on how to approach this? Is there a method that might be faster than exporting each layer, deleting fields, creating new feature classes and tables, manually entering uids, etc.? Thank you for any additional thoughts. Kristal

Kristal Walsh, Florida Fish and Wildlife
Office of Conservation Planning
0 Kudos
DougBrowning
MVP Frequent Contributor

This is never easy to pull off.  In general I prefer the build a new house next to the old one approach.  Then when its done you shut the old down for a day, move it all over, point everyone to the new spot.  Good luck!

View solution in original post

0 Kudos
KristalWalsh
Occasional Contributor

I was afraid of that. I will reluctantly accept your solution. 😁 I may need to come back for help once I get these set up. Thank you again. Kristal

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