Split intersecting line arcade error

475
2
05-26-2021 12:57 AM
alejandroDimas
New Contributor

Hello!

I am using this attribute rule (split intersecting line):

https://github.com/MikeMillerGIS/arcade-expressions/blob/master/attribute_rule_calculation/SplitInte...

 

But when i insert a point i get this error: "GlobalID: The field is not editable"

Any ideas?

 

Thanks

 

 

0 Kudos
2 Replies
JohannesLindner
MVP Frequent Contributor

Towards the end of the script, they set the GlobalID of new features. GlobalID is not editable by the user, so that doesn't work. Try commenting out the lines that say " 'globalID': GUID() ".

 if (polyline_1_length > polyline_2_length) {
        update_features[Count(update_features)] = {
            'globalID': line_feature.globalID,
            'geometry': polyline_1
        };
        new_features[Count(new_features)] =
            {
//                'globalID': GUID(),
                'geometry': polyline_2,
                'attributes': pop_keys(line_att, keys)
            };
    } else {
        update_features[Count(update_features)] = {
            'globalID': line_feature.globalID,
            'geometry': polyline_2
        };
        new_features[Count(new_features)] =
            {
//                'globalID': GUID(),
                'geometry': polyline_1,
                'attributes': pop_keys(line_att, keys)
            };
    }

 


Have a great day!
Johannes
0 Kudos
alejandroDimas
New Contributor

Thank you Johannes!

I tried that but the same error appears.

The matter is that if I use this geodatabase (https://github.com/MikeMillerGIS/arcade-expressions/blob/master/attribute_rule_calculation/SplitInte...) it works, but if I use my own geodatabse it doesn't work

 

Thanks!

 

0 Kudos