I set up an attribute rule to populate a unique ID field in our Address Points layer.
I also set up a corresponding database sequence.
When I add an address point as the database owner, no problem.
When another user who is not the database owner adds an address point, they get an error message about the database sequence.
Anyone have any idea what could be causing this?
Solved! Go to Solution.
see: https://community.esri.com/ideas/16977
Xander Bakker; Attribute rules can't be applied to AGOL hosted feature layers, can they?
Hi jborgion ,
Unfortunately, that is correct. Attribute Rules live on the data side and the relational datastore of AGOL is not yet supported.
I had what looked like the same problem. It seemed to depend upon the version of Pro. Calculation rule using NextSequenceValue worked fine with Pro 2.6, but not with Pro 2.8 Same rules, same Pro project, same enterprise database set up for branched versioning, same operating system. I initially thought it was because Pro2.8 need User.SeqName but the real problem was that Under Pro2.8 a rule using NextSequenceValue must have "Eclude from Application execution checked. This is enforced when editing the rule, but just throws an unhelpful error under Pro2.8.
@CraigCarsley Were you ever able to get around the owner issue? We use Enterprise Geodatabase with 3 sets of owners (ADMIN, EDITOR - read/write, USER - read). I can use the NextSequenceValue('OWNER.SEQUENCE_NAME') if I am the owner (ADMIN), but we publish our data for editing with the EDITOR user. If published through EDITOR, I continue to receive the "DBMS sequence not found." when inserting a new record.
We have not pursued any further solution because we haven't needed to. Our data is all owned by the same user, "GIS." So our attribute rule simply contains:
NextSequenceValue("GIS.SITEADDID");
This works for all users who have edit privileges on the data.
Thank you for posting this question and solution. We have done a ton of testing and finally took down production data to make schema changes this afternoon - I thought I was going to have to disable this rule since it threw this error when I tried to add a point as an editor and not the layer owner... but adding the layer owner login name did the trick!
Now if Attribute Rules could allow calculations from geocoders, or from layers in another database, I'd be in business replacing Attribute Assistant..
@CraigCarsley Can i make the change to the database sequence name (fully qualifying with owner name) in the attribute rules pane? or would the database sequence need to be recreated with the qualified name?
@BThompson Can i make the change to the database sequence name (fully qualifying with owner name) in the attribute rules pane? or would the database sequence need to be recreated with the qualified name?
I believe that you can just compose the expression with the owner in the popup window for the Attribute Rules, where in the Attribute Rule, in the expression, write var id = NextSequenceValue("owner.Seqname")
I believe that's how we tested it out.