Error details: ERROR 002904: Sequence does not exist.
[Rule Name: "SL-Unique Name/ID Generation",
Sequence Name: "DUCTAUTONUMBERING"]
I have create the sequence first in PostgreSQL database and granted the select, update and delete permission to the sequence and later we developed arcade code. the rule was a constraint rule that rule need to trigger on insert and update events. please find the code below ways I tried. same schema i create connection file but I am not able to find the root cause. can you please help me.
Type:1
var cat = DefaultValue($feature.NE_CATEGORY_NAME, "");
var type = DefaultValue($feature.NE_TYPE_NAME, "");
if (cat != "OSP") { return null; }
var valid = Decode(type, "TRENCH", 1, "CONDUIT", 1, "POWER", 1, 0);
if (valid == 0) { return null; }
var nextVal = NextSequenceValue('DUCTAUTONUMBERING');
return Text(nextVal);
Type2:
var nextVal = NextSequenceValue('unm_owner.DUCTAUTONUMBERING')
Type3:
var nextVal = NextSequenceValue('unm_owner.DUCTAUTONUMBERING');