I am trying to create a feature class with attribute rules (ArcPro 2.9.2), where the next sequential number is added to the uniqueID field when a new feature is inserted. The Arcade expression appears to be correct, but the “Save” button is greyed out and I’m not able to test if the attribute rule works. I first created a database sequence I named "MySeq" for the file geodatabase, with sequence start id = 1 and sequence increment value = 1.
Arcade Expression:
var id = NextSequenceValue ("MySeq");
return 'ID-${id}'
Any guidance would be greatly appreciated.
Solved! Go to Solution.
Hmm, your images seem to be lost...
If you hover over the red square to the left of the attribute rule or over the greyed out save button, ArcGIS tells you what is wrong.
You use the wrong symbol for the template literal.
You're using single quotes, but it has to be backticks.
var id = NextSequenceValue ("MySeq");
return `ID-${id}`
// or just use this
//return "ID-" + id
Hmm, your images seem to be lost...
If you hover over the red square to the left of the attribute rule or over the greyed out save button, ArcGIS tells you what is wrong.