Reorder Attribute Rule (Data Management)

Summary

Reorders the evaluation order of an attribute rule.

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

Learn more about attribute rule evaluation order

Parameters

LabelExplanationData Type
Input Table

The table that contains the attribute rule with the evaluation order that will be updated.

Table View
Calculation Rule Name

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

String
Evaluation Order

The new evaluation order for the rule. For example, if there are five rules and a particular rule is in position 5 (the fifth order position, to be evaluated last) but you want it to be evaluated in position 2 (to be evaluated second), enter 2 for the value. The evaluation order for the rules after position 2 will be reassigned (that is, position 2 becomes position 3, position 3 becomes position 4, and position 4 becomes position 5).

Long

Derived Output

LabelExplanationData Type
Updated Table

The input table with its attribute rule evaluation order updated.

Table View

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

The table that contains the attribute rule with the evaluation order that will be updated.

Table View
name

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

String
evaluation_order

The new evaluation order for the rule. For example, if there are five rules and a particular rule is in position 5 (the fifth order position, to be evaluated last) but you want it to be evaluated in position 2 (to be evaluated second), enter 2 for the value. The evaluation order for the rules after position 2 will be reassigned (that is, 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 example (Python window)

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

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

Environments

Licensing information

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

Related topics