Skip To Content

Alter Attribute Rule

Summary

Alters the properties of an attribute rule.

Usage

  • Altering an attribute rule requires an exclusive lock on the dataset. Any active connections to the dataset should be closed, which may include stopping any services.

Syntax

AlterAttributeRule_management (in_table, name, {description}, {error_number}, {error_message}, {tags})
ParameterExplanationData Type
in_table

The table containing the attribute rule to 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 description as is, leave this parameter empty. To clear the current value of the description, use the RESET keyword.

  • RESETClear the value of the current rule description.
String
error_number
(Optional)

The error number of the attribute rule. To leave the error number as is, leave this parameter empty. To clear the current value of the error number for a calculation rule, use the RESET keyword. Error number is a required property for constraint and validation rules and cannot be cleared.

  • RESETClear the value of the current rule error number.
String
error_message
(Optional)

The error message of the attribute rule. To leave the error message as is, leave this parameter empty. To clear the current value of the error message for a calculation rule, use the RESET keyword. Error message is a required property for constraint and validation rules and cannot be cleared.

  • RESETClear the value of the current rule error message.
String
tags
(Optional)

The tags for the attribute rule. Be aware that the new values will replace all existing tags; if you want 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 current tags as is, leave this parameter empty. To clear the current tags, use the RESET keyword.

  • RESETClear the tags for the rule.
String

Derived Output

NameExplanationData Type
updated_table

The updated input table with the attribute rule properties updated.

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.AlterAttributeRule_management("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