Hello people, I came across an error, "The evaluation of attribute rules is cyclic or exceeds maximum cascading level." during editing a feature with an attribute rule made by arcade expression.
As I am new to Arcade, I referenced a sample expression from github to set up the rules that divides a line into two features. The original code works fine that uses a point feature to divide a line at the intersection with the line feature. But I used a start point of a line feature instead of a point feature for my purpose. After I made the simple change in the code, edit works sometimes but get above error sometime randomly. For example, even if I get the error, if I change a place to draw a line feature, then it works without the error.
I have been searching any clue regarding this error but have not had any luck yet. Any help would be much appreciated. Thanks in advance!
We'd gladly help you, but we need to see the actual code you used for that. Please post that:
Problem is probably in line 43:
var intersecting_lines = Intersects(line_fs, start_point);
What this code does (in a very general way) is this:
But intersecting the start point of $feature with the lines also finds $feature, so you're editing $feature and request edits to be made to $feature and it just cycles endlessly (or it would, but ArcGIS stops it).
Try adding this after line 43:
var gid = $feature.GlobalID
intersecting_lines = Filter(intersecting_lines, "GlobalID <> @gid"))
This will remove $feature from the edited lines.
Thanks a lot for your help!
But unfortunately, I still got a same error after I added the given code like below.
var start_point = Geometry($feature).paths[0][0]
var intersecting_lines = Intersects(line_fs, start_point);
var gid = $feature.GlobalID
intersecting_lines = Filter(intersecting_lines, "GlobalID <> @gid")
,