Alter Attribute Rule (Data Management)

Summary

Alters the properties of an attribute rule.

Parameters

LabelExplanationData Type
Input Table

The table containing the attribute rule that will be altered.

Table View
Rule Name

The name of the attribute rule that will be altered.

String
Description
(Optional)

The description of the attribute rule.

To clear the existing value of the description, choose the Reset option from the drop-down menu.

  • ResetThe existing rule description value will be cleared.
String
Error Number
(Optional)

The error number of the attribute rule.

To clear the existing error number value for a calculation rule, choose the Reset option from the drop-down menu. Error number is a required property for constraint and validation rules and cannot be cleared for those rule types.

  • ResetThe existing rule error number value will be cleared.
String
Error Message
(Optional)

The error message of the attribute rule.

To clear the existing error message value for a calculation rule, choose the Reset option from the drop-down menu. Error message is a required property for constraint and validation rules and cannot be cleared for those rule types.

  • ResetThe existing rule error message value will be cleared.
String
Tags
(Optional)

The tags for the attribute rule.

To clear all tags, click the delete button Delete to remove each tag from the list, and choose Reset from the drop-down menu.

  • ResetThe existing rule tags will be cleared.
String
Triggering Events
(Optional)

Specifies the editing events that will trigger the attribute rule to take effect. Triggering events are only applicable for constraint rules and immediate calculation rules.The new values will replace existing triggering events. To keep the existing triggering events, leave this parameter empty.

  • InsertThe rule will be applied when a new feature is added.
  • UpdateThe rule will be applied when a feature is updated.
  • DeleteThe rule will be applied when a feature is deleted.
String
Script Expression
(Optional)

An ArcGIS Arcade expression that defines the rule. To keep the existing expression, leave this parameter empty. If an expression is provided for this parameter, it will replace the existing Arcade expression of the rule. If you alter the script expression of a batch calculation or validation rule, the rule must be reevaluated.

Calculator Expression
Exclude From Client Evaluation
(Optional)

Specifies whether the application will evaluate the rule locally before applying the edits to the workspace.

The default for this parameter corresponds to the existing value set for the rule. That is, if the input rule has the exclude from client evaluation parameter set to false, the default for this parameter will be unchecked so the rule will not be automatically excluded. This parameter is not applicable for validation rules or batch calculation rules.

  • Checked—The rule will be excluded from client evaluation.
  • Unchecked—The rule will not be excluded from client evaluation.

Boolean
Triggering Fields
(Optional)

A list of fields that will trigger an attribute rule to run when an editing event occurs during an update trigger for calculation and constraint attribute rules. If no fields are specified, the tool will use all fields.

To enter multiple triggering fields, use a semicolon delimiter, for example, Field1;Field2;Field3.

String

Derived Output

LabelExplanationData Type
Updated Table

The input table with the updated attribute rule properties.

Table View; Raster Layer; Mosaic Layer

arcpy.management.AlterAttributeRule(in_table, name, {description}, {error_number}, {error_message}, {tags}, {triggering_events}, {script_expression}, {exclude_from_client_evaluation}, {triggering_fields})
NameExplanationData Type
in_table

The table containing the attribute rule that will be altered.

Table View
name

The name of the attribute rule that will be altered.

String
description
(Optional)

The description of the attribute rule.

To keep the existing value of the description, leave this parameter empty. To clear the existing value of the description, use the RESET keyword.

  • RESETThe existing rule description value will be cleared.
String
error_number
(Optional)

The error number of the attribute rule.

To keep the existing error number value, leave this parameter empty. To clear the existing error number value for a calculation rule, use the RESET keyword. Error number is a required property for constraint and validation rules and cannot be cleared for those rule types.

  • RESETThe existing rule error number value will be cleared.
String
error_message
(Optional)

The error message of the attribute rule.

To keep the existing error message value, leave this parameter empty. To clear the existing error message value for a calculation rule, use the RESET keyword. Error message is a required property for constraint and validation rules and cannot be cleared for those rule types.

  • RESETThe existing rule error message value will be cleared.
String
tags
[tags,...]
(Optional)

The tags for the attribute rule.

The new values will replace all existing tags; to keep any current tags, include them in this list. For multiple tags, use a semicolon delimiter, for example, Tag1;Tag2;Tag3. To keep the existing tags, leave this parameter empty. To clear the existing tags, use the RESET keyword.

  • RESETThe existing rule tags will be cleared.
String
triggering_events
[triggering_events,...]
(Optional)

Specifies the editing events that will trigger the attribute rule to take effect. Triggering events are only applicable for constraint rules and immediate calculation rules.The new values will replace existing triggering events. To keep the existing triggering events, leave this parameter empty.

  • INSERTThe rule will be applied when a new feature is added.
  • UPDATEThe rule will be applied when a feature is updated.
  • DELETEThe rule will be applied when a feature is deleted.
String
script_expression
(Optional)

An ArcGIS Arcade expression that defines the rule. To keep the existing expression, leave this parameter empty. If an expression is provided for this parameter, it will replace the existing Arcade expression of the rule. If you alter the script expression of a batch calculation or validation rule, the rule must be reevaluated.

Calculator Expression
exclude_from_client_evaluation
(Optional)

Specifies whether the application will evaluate the rule locally before applying the edits to the workspace.

The default for this parameter corresponds to the existing value set for the rule. That is, if the input rule has the exclude from client evaluation parameter set to false, the default for this parameter will be INCLUDE so the rule will not be automatically excluded. This parameter is not applicable for validation rules or batch calculation rules.

  • EXCLUDEThe rule will be excluded from client evaluation.
  • INCLUDEThe rule will not be excluded from client evaluation.

Boolean
triggering_fields
[triggering_fields,...]
(Optional)

A list of fields that will trigger an attribute rule to run when an editing event occurs during an update trigger for calculation and constraint attribute rules. If no fields are specified, the tool will use all fields.

To enter multiple triggering fields, use a semicolon delimiter, for example, Field1;Field2;Field3.

String

Derived Output

NameExplanationData Type
updated_table

The input table with the updated attribute rule properties.

Table View; Raster Layer; Mosaic Layer

Code sample

AlterAttributeRule example (Python window)

Alter the properties of a constraint attribute rule named constraintRuleOP.

import arcpy
arcpy.management.AlterAttributeRule("C:\\MyProject\\sdeConn.sde\\progdb.user1.GasPipes", 
                                    "constraintRuleOP",
                                    "Operating pressure cannot exceed 300",
                                    "999",
                                    "Invalid operating pressure value",
                                    "Pipeline;OP;ExceededValue")

Environments

Licensing information

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

Related topics