I have a situation were I need to create/clone a feature and related records as well in a calculate rule. The issue is the related records are related by the feature GlobalID. I have no issues if I use fields that are not read-only, but in my situation I do not have that luxury. I have tried:
- Setting the GlobalID prior to the insert using GUID() on the feature and using the same guid in the related record.
- Adding "GlobalID": "{E812C101-3D95-46A9-B12F-C45F3FBFA7F9}" to the attribute rules.
- Since it's a read only field, an error is thrown.
- Adding globalID one level after the 'adds' is ignored - { "edit": [ {"adds": [ { "attributes": ..., "geometry": ..., "globalID": "{AA12C101-3D95-46A9-B12F-C45F3FBFA7F9}" ]}]}
- Tried using the 'tag' flag, but that only works with UN Associations.
- https://pro.arcgis.com/en/pro-app/2.9/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm
- This is exactly what I want except to be able to indicate the related table.
Sample json trying to use the 'tag' keyword:
{
"edit": [
{
"adds": [
{
"attributes": {
"ASSETGROUP": 1,
"ASSETID": "ABC1234",
"ASSETTYPE": 9,
"LASTUPDATE": "2000-01-01T00:00:00.000Z"
},
"geometry": {
"hasZ": true,
"paths": [
[
[ 1035213.7623968, 2253188.4937827, 0 ],
[ 1035239.3082778, 2253154.9229833, 0 ]
]
],
"spatialReference": {
"wkid": 102671
}
},
"tag": "newLineFeature"
}
],
"className": "PipelineLine"
},
{
"adds": [
{
"attributes": {
"LineGlobalID": "newLineFeature.globalid",
"Notes": "A relate"
},
"tag": "newLineFeatureRel0"
}
],
"className": "LineRelateTable"
}
],
"result": "Completed"
}
Is there any way to do this?
Thanks