Template attribute rules

In addition to authoring a user-defined attribute rule, you can create an attribute rule using a template. There are templates available to assist you with authoring attribute rules for specific workflows. Attribute rule templates allow you to benefit from attribute rule functionality without having to author the Arcade script expression.

Each template has its own dialog with parameters to fill in that is used to generate an attribute rule with the appropriate Arcade script expression built from the input parameter values. After running the tool, you can review the attribute rule properties and make changes before saving. The attribute rules created from the templates can be saved as either an immediate calculation rule or a batch calculation rule.

Learn more about how to create an attribute rule from an attribute rule template

The following attribute rule templates are available:

Review each template to understand the use cases and associated parameters. As your data evolves, you may need to regenerate the attribute rule.

Generate Symbol Rotation

The Generate Symbol Rotation template allows you to define an attribute rule on a point feature class. When a feature is created, the rotation field is updated with the angle from the intersecting line feature class that you specify. Optionally, you can specify conditions in which certain rotations apply based on different feature attributes.

When using the Generate Symbol Rotation template, be aware of the following considerations:

  • Features created on a vertex return the average line angle value.
  • When lines occupy the same geographic space, a tiebreaker is used when there are nonunique values for the orientation field. In the case of one line feature class, the ObjectID is used. In the case of one or more line feature classes, the order in which you specify the line feature classes matters in addition to the ObjectID.
  • After generating the attribute rule, you will need to modify the layer to vary symbology by rotation so the symbol of the feature rotates according to the rotation field specified in the tool.

The following are best practices:

  • When using multiple intersecting line feature classes, it is best to use the same data type for the orientation field.
  • When selecting an orientation field for one or more line classes, use a field that contains unique values.
  • Use a line feature class once as an intersecting line class.
  • When conditioning logic to trigger the attribute rule from one value in a single field, use the where condition to specify the expression. When filtering for multiple values with different rotation values, use the rotation options to specify the expression.

To learn more about each parameter, see the Generate Symbol Rotation Attribute Rule tool.

Generate ID

The Generate ID template allows you to define an attribute rule that generates a unique value based on a predefined user configuration. For instance, if you always want a value populated in a specific format, such as BLD-X-A where X represents a unique monotonically numeric value, you can define the options within this template. As a part of the process, database sequences are used either by creating a new database sequence or using an existing database sequence.

The following are best practices:

  • When using table as the definition type, the table columns must match the table output (ID_Table) seen from the builder option.
  • Coded value definition type must have fields with domains defined.
  • Defining the unique value format must match the field datatype that supports the unique value format. For instance, if your format is BLD-X-A , where X represents a monotonically numeric value, the field data type must be text.
  • When conditioning logic to trigger the attribute rule from one value in a single field, use the where condition to specify the expression. When filtering for multiple values, use the Filter SQL to specify the expression.

To learn more about each parameter, see the Generate ID Attribute Rule tool.

Generate Spatial Join

The Generate Spatial Join template allows you to define an attribute rule where you can map one or more fields on a destination dataset (also known as input table) and pull attribute information from one or more origin datasets. Field mapping can be used to map fields to existing fields or new fields can be created in the destination dataset as a part of creating the attribute rule.

The following is a best practice:

  • A join class must only be used once.

To learn more about each parameter, see the Generate Spatial Join Attribute Rule tool.