Greetings! Struggling with Arcade and an attribute rules and seeking help from the community.
I am working on a project where a gas client is migrating data to the UPDM and utility network using ArcGIS Pro. They have been using Pro a little bit, and within their existing gas geodatabase, they have a feature dataset for Gas Leak data. Within that dataset, they have an existing/old layer called G.Identified_Issues and they are migrating this layer into to the UPDM feature class called P.Identified_Issues. Their existing/old Identified_Issues layer has 5 attribute rules (ARs), one of which is not working. I need to ensure all the ARs are set (wording can change within the Arcade expression and likely will since the layer names are a little different with UPDM).
The problem AR is a calculation type with a description stating: "New Identified Issues created by the application will populate the address field to the nearest Gas Meter: FULL_ADDRESS. The user will be able to edit the field afterwards if needed."
The problem portion of the problem AR is this piece of the script expression that states:
var meters = FeatureSetByName($datastore, "{361B7729-29FC-47DE-852A-D2172492C5BF}", ["Full_Address"], true)
Unfortunately the table/layer it is referencing in {} has a name formatted like a globalID, but I can't find that ID anywhere in the existing data (searched gas meters layer for that globalID and also searched client ArcGIS Portal but no luck) and the client also is unsure why it is referencing a table that is named like that. The client also said that it should be searching for the nearest record in GasMeters (old layer) from SDE. GasMeters as an old standalone layer has migrated to PipelineDevice in the UPDM/Utility Network dataset and meters can be queried out with ASSETGROUP = 2.
When I import the AR without changing anything, Pro gives me an error that states "ERROR 002717: Invalid Arcade expression, Arcade error: Table not found {361B7729-29FC-47DE-852A-D2172492C5BF}, Script line 3 [ORA-00931: missing identifier]"
Does anyone have any suggestions as to why the existing AR expression is referencing a table written like that? The client said "it should be searching for the nearest record in GasMeters from SDE. I'm guessing that's what it is doing but I don't know why the Arcade expression is written that way."
And the biggest question - does anyone know how to reword this portion of the Arcade expression so that it is referencing PipelineDevice ASSETGROUP=2 in order to still do the same thing?
Thank you so much in advance - this is a stumper for me.