Attribute Rule NextSequenceValue Fails on Feature Service

1098
1
06-11-2021 12:00 PM
Labels (3)
JasonHarshman
Occasional Contributor

I have a attribute rule for an immediate calculation to populate sequential IDs using the arcade function NextSequenceValue() when an insert is triggered.

When I try inserting a new row into the feature service's attribute table from ArcGIS Pro, I get an error that says:

Add table row failed.

ERROR: Unable to complete operation. Unable to perform applyEdits operation. 

On ArcGIS Server, the log says:

Error: The field is not nullable. [inventory_a2z_id]

I do not have this issue if I add a new row in the geodatabase table directly in ArcGIS Pro.  

Additional info:

ArcGIS Enterprise 10.8.1

ArcGIS Pro 2.7.3

Immediate Calculation Arcade Expression: return NextSequenceValue('InventoryIDs')

Triggers: Insert

Execution: Exclude from client evaluation is enabled (box checked)

0 Kudos
1 Reply
by Anonymous User
Not applicable

Checkout this post on the Exclude from client evaluation parameter:

https://community.esri.com/t5/attribute-rules-blog/attribute-rules-exclude-from-application-evaluati...

 

Since Pro is trying to make the insert before sending the edit to the server AND the field must have a NOT NULL requirement that might be why it errors. I'm guessing if you try to insert the service directly (maybe try through Map viewer) then you won't get an error. 

As a workaround you could add a calculation rule before this one that sets the ID to some random value and without checking Exclude from client evaluation checked to get around the NOT NULL requirement. But, that might confuse your editors.

0 Kudos