Select to view content in your preferred language

Attribute Rules can't be saved

1624
3
Jump to solution
04-22-2023 08:37 PM
HanZheng
Emerging Contributor

Hello,

I created a immediate calculation rule to calculate the length of polyline when the insert/update action occurred. I made sure I checked syntax when enter the Arcade codes, but when I tried to save rule, the rule row turned red without telling what's wrong. 

Does anyone have idea what's wrong with this rule? The targeted field "Length_" has data type of "float". The polyline feature class uses WGS1984 (WKID 4326) and probably because of that, the default shape_length return incorrect shape length numbers. That's why I decided to set up a new column. I tried to use field calculator just to make sure calculate geometry worked under this spatial reference.

HanZheng_0-1682220736351.png

 

0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

If you hover over the red square, it should tell you what's wrong.

Common reasons you can't save a rule:

  • You forgot to add GlobalIDs to the feature class
  • You forgot to set a trigger event
  • Error in your script
  • You're editing the feature class (though that will deactivate the save button, not show the red square)

 


Have a great day!
Johannes

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

what about length geodesic

Geometry functions | ArcGIS Arcade | ArcGIS Developers


... sort of retired...
0 Kudos
JohannesLindner
MVP Frequent Contributor

If you hover over the red square, it should tell you what's wrong.

Common reasons you can't save a rule:

  • You forgot to add GlobalIDs to the feature class
  • You forgot to set a trigger event
  • Error in your script
  • You're editing the feature class (though that will deactivate the save button, not show the red square)

 


Have a great day!
Johannes
HanZheng
Emerging Contributor

Thanks. I didn't realize that's the way to find error message. Global ID was the issue for my case. 

0 Kudos