Execute an attribute rule manually

723
6
10-20-2020 01:56 PM
JoeBorgione
MVP Esteemed Contributor

I think someone one showed me how to do this, but I just can't remember.  Here is my scenario:  I have an existing feature class to which I added a couple of fields.  Those fields are to be populated as a concatenation of some other field values.

What I did to run them manually was first set them for insert and modify.  Then I selected all the features, and in one of the fields I have the new concatenation rules set, I simple hit the space bar while in the selected attributes pane.  That's enough for a modification so both rules fired and I'm good to go.

However, that's sort of a hack; I thought there is a way to execute a rule manually without even making a phony modification.

That should just about do it....
0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Joe Borgione‌ are you talking about "Immediate Calculations"?

Calculation attribute rules—ArcGIS Pro | Documentation 


... sort of retired...
0 Kudos
JoeBorgione
MVP Esteemed Contributor

Not exactly: these rules are specifically set up to fire when a feature is either added or modified so they fall in the class of Immediate Calculations.  Basically all the features are already in the feature class and I added a couple of fields;  I wrote the rules just to get some practice; I could have just used the field calculator, but where is the fun in that?

That should just about do it....
0 Kudos
DanPatterson
MVP Esteemed Contributor

Have you made a custom toolbox that performs the repetitive add fields, and loads your calculations that you use most often?  that would be fun


... sort of retired...
0 Kudos
JoeBorgione
MVP Esteemed Contributor

I asked around and there is no 'button to click' to execute an attribute rule on demand.  What was shown me was essentially the same thing I mention above: select a record and simply run a field calculation on the field with the rule and it will fire.

That should just about do it....
0 Kudos
HusseinNasser2
Esri Contributor

This is probably what you are looking for Joe, Batch Calculation / Validation Rules which can be executed through the Evaluate method in error inspector in Pro or through the REST end point.

 

Video here

https://community.esri.com/t5/attribute-rules-videos/create-publish-and-work-with-batch-calculation-...

 

LeonS
by
Occasional Contributor II

I am also looking for the ability to run an attribute rule manually.  I'm attempting to reproduce some of the rules I had set up using the Attribute Assistant in ArcMap, as I migrate my data editing to Pro.  I've found some particular rules executing automatically causes more problems than it is helpful.

I was beginning to look into the Batch Calculation, but it seems that only a workspace w/ branch versioning or FGDB is supported.  https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/evaluate-attribute-rules.ht...

I am working with an SQL Server geodatabase w/ "traditional" versioning.  Is this supported?  If not, is it coming?  Is setting up a feature service also a requirement?  There is just one editor, so these seems like an awful lot of overhead if I need to set up a service. 

Edited -

I see that branch versions are only editable through a web feature service.  https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/branch-version-scenarios.ht...

 

 

Leon

 

 

0 Kudos