Select to view content in your preferred language

Arcade in Attribute Rules Error

1722
7
Jump to solution
03-21-2022 11:27 AM
JorgeKappa
Regular Contributor

Trying to log edits to a layer to a table. It works with some fields, it fails with others with the following error: 

JorgeKappa_0-1647887219392.png

Here's my code: 

JorgeKappa_1-1647887249704.png

Any clues?

TIA

Tags (2)
0 Kudos
4 Solutions

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

I get this error if I supply wrong field names. In your case, Arcade could not find the field "serial" in "VPS_BFP_FAIL_2022".


Have a great day!
Johannes

View solution in original post

JorgeKappa
Regular Contributor

Strange, because it's all there, alias properly spelled, field name brought in from the expression builder, not typed. Only three fields work. The rest throw the out of index error except OBJECTID and GlobalID throw the field not editable error.

JorgeKappa_0-1647954623839.png

 

View solution in original post

0 Kudos
JohannesLindner
MVP Frequent Contributor

alias properly spelled

See, there's your problem. You need the real field names, not the aliases.


Have a great day!
Johannes

View solution in original post

JohannesLindner
MVP Frequent Contributor

Currently, Attribute Rules don't work in ArcGIS Online, only in Pro and Portal.

Go lend your support to this very popular idea:

Support for Attribute rules in ArcGIS Online - Esri Community


Have a great day!
Johannes

View solution in original post

7 Replies
JohannesLindner
MVP Frequent Contributor

I get this error if I supply wrong field names. In your case, Arcade could not find the field "serial" in "VPS_BFP_FAIL_2022".


Have a great day!
Johannes
JorgeKappa
Regular Contributor

Strange, because it's all there, alias properly spelled, field name brought in from the expression builder, not typed. Only three fields work. The rest throw the out of index error except OBJECTID and GlobalID throw the field not editable error.

JorgeKappa_0-1647954623839.png

 

0 Kudos
JohannesLindner
MVP Frequent Contributor

alias properly spelled

See, there's your problem. You need the real field names, not the aliases.


Have a great day!
Johannes
JorgeKappa
Regular Contributor

Bingo!

Tags (2)
0 Kudos
JorgeKappa
Regular Contributor

Johannes, everything works well in Pro desktop. Then I publish the weblayer and the table to AGOL, but when I edit there, nothing gets written to the table. What could be happening there?

0 Kudos
JohannesLindner
MVP Frequent Contributor

Currently, Attribute Rules don't work in ArcGIS Online, only in Pro and Portal.

Go lend your support to this very popular idea:

Support for Attribute rules in ArcGIS Online - Esri Community


Have a great day!
Johannes
JorgeKappa
Regular Contributor

I'd swear I read somewhere that if you upload the .gdb with the layer and the table it would work.

 

0 Kudos