We want to incorporate flood protection lines (dykes and walls) into our geodatabase (sde).
- These lines are written into bylaws in semi regular intervals.
- The different versions (e.g. bylaw 2015, bylaw 2017) have to be reproducible.
- Only the newest version can be edited, old versions must not be editable.
- One and only one feature class. We don't want a feature class for every version, we don't want to export old versions.
- Include a field describing the version, make it depending on a coded value domain.
- Different versions can be reproduced with views or definition queries.
- When the latest version is written into a bylaw, create a new coded value, copy all features from the last version and change the version field. We can do this manually or create a tool.
- Somehow forbid users from editing old versions.
- I could use an Attribute Rule to forbid editing old versions. But we haven't all switched to Pro yet, and AR make the feature class inaccessible in ArcMap. Is there another way to set edit permissions by attribute?
- If I created a constraint AR with this code, triggered on insert, update, and delete:
It works with responsible users, but an irresponsible user could still change the value of Version to 'Edit' and edit the feature. They can't change the value back to the original version, so it's the equivalent of deleting the feature from the version. Also, with this code I have to disable the rule to change all 'Edit' features to a new uneditable version.
Is there a way to circumvent these caveats?