Trying to log edits to a layer to a table. It works with some fields, it fails with others with the following error:
Here's my code:
Any clues?
TIA
Solved! Go to Solution.
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".
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.
alias properly spelled
See, there's your problem. You need the real field names, not the aliases.
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
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".
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.
alias properly spelled
See, there's your problem. You need the real field names, not the aliases.
Bingo!
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?
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
I'd swear I read somewhere that if you upload the .gdb with the layer and the table it would work.