Error Saving Attribute Rule with correct Syntax

04-17-2024 05:39 PM
Labels (1)
New Contributor III

Hello everybody,

Would anyone happen to have run into something similar and know a solution to the below problem i'm having?

This is in Pro 2.9 and Enterprise 10.9.1.

I am trying to test adding an immediate calculation attribute rule using python to multiple feature classes in a dataset that I own in a test database, so the fc names goes something like this;  TestDB."MYNAME\ORGANIZATION".fc

The backslash has created many problems with testing what in reality is a very simple script.
Initially I can save the attribute rule on any of the fc's in my dataset in Pro, with the following function;





FeatureSetByName($datastore, "fc", ['FIELD'])





I discovered that Pro upon successfully validating and saving the Attribute Rule adds the full fc name to the script;





FeatureSetByName($datastore, 'TestDB."MYNAME\ORGANIZATION".fc', ['FIELD'])





This is fine, and the Attribute Rule can be successfully used when triggered.
However, when attempting to save a change or really just save the attribute rule again from Pro the backslash causes this error Arcade error: Identifier expected, Script line: 1

Arcpy from an IDE or Pro Notebook cannot add the full fc name like Pro does when saving the rule. So this lead me to try and format the script in the Attribute Rule Arcade Editor by concatenating a string of the first part of the full fc name , TextFormatting.BackwardSlash,  and the rest of the fc name.

Even though this is correct according to Arcade Syntax and is successfully verifiable, upon trying to save I get 
ERROR 99999

At this point it seems I have to just test on another featureclass without that naming convention (backslash), but that messes up our testing process and this seems like it should be a non issue.

Thank you for your time!

0 Kudos
0 Replies