Reorder Attribute Rule (Data Management)

Summary

Reorders the evaluation order of an attribute rule.

When rules are evaluated, the evaluation order controls the sequence in which the rules are evaluated. The evaluation order is important when there are dependencies on calculated fields, since the result could be impacted if the rules are in a different order.

Learn more about attribute rule evaluation order

Usage

  • This tool requires an exclusive schema lock on the input feature class or table.

  • If the data is stored in an enterprise geodatabase, this tool must be run using a connection as the data owner.

Syntax

arcpy.management.ReorderAttributeRule(in_table, name, evaluation_order)
ParameterExplanationData Type
in_table

The table that contains the attribute rule.

Table View
name

The name of the calculation rule that will have its evaluation order altered.

String
evaluation_order

The new evaluation order value for the rule. For example, if you have 5 rules and this rule is ordered to execute last (the fifth position) but you want it to be evaluated in the second position, enter the value 2. The evaluation order values for the rules after position 2 will be reassigned to follow this rule (for example, position 2 becomes position 3, position 3 becomes position 4, and position 4 becomes position 5).

Long

Derived Output

NameExplanationData Type
updated_table

The input table with its attribute rule evaluation order updated.

Table View

Code sample

ReorderAttributeRule Python example

Use the ReorderAttributeRule tool to update the evaluation order of a calculation rule named calculateRuleLabel to be evaluated first.

import arcpy
arcpy.ReorderAttributeRule_management("C:\\MyProject\\sdeConn.sde\\progdb.user1.GasPipes", 
                                      "calculateRuleLabel", 1)

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics