Attribute operations

The Value Method field in the DynamicValue table defines the actions that occur when the Attribute Assistant is enabled and features are modified or created in ArcMap. Four fields in the DynamicValue table (Value Method, Table Name, Field Name, and Value Info) must be configured to use an Attribute Assistant method. The remaining fields define when the Attribute Assistant method should be applied.

The following 12 Attribute Assistant methods can be configured in your DynamicValue table:

Method Description
Angle Calculates the geographic or arithmetic angle of a line feature.
Cascade Attributes Updates all occurrences of a value when the corresponding value in another table is changed.
Expression Executes a VBScript evaluated by the MSScriptControl. Can be used to access built-in functions and conditional logic (if statements).
Feature Statistics Summarizes the attribute values of the affected feature as a series of statistics or a single calculated value.
Field Copies the value from from one field to another within the same feature class.
Field Trigger Updates a field to a specified value when the value of another field is updated.
Junction Rotation Stores the rotation angle of a junction feature based on connected edge features.
Last Value Repeats the last value used in a field.
Map Info Stores information from the current map document metadata or the version info of the layer being edited.
Previous Value Monitors a field, and when it is changed, stores the previous value in another field.
Prompt Identifies records containing null values. If the field uses a subtype or domain, those options are presented in the dialog box for the user to select.
Side Determines if a point feature is to the left or right of a corresponding line feature.

Angle

Calculates the geographic or arithmetic angle of a line feature.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Feature class name Field used to store the calculated angle ANGLE {Angle Type}

This rule can only be configured on linear features, and the angle value must be populated in Float or Double fields.

Parameters

The method parameters are as follows:

Parameter Value Description
Angle Type (Optional) A Populates arithmetic angle (counter-clockwise from positive X axis).
G (Default) Populates geographic angle (clockwise from positive Y axis).

Examples

Populates the BREAK field in the wMain layer with the angle between the line and due north:

  • Table Name: wMain
  • Field Name: BREAK
  • Value Info: <Null>

Populates with the angle between the line and due east:

  • Table Name: wMain
  • Field Name: BREAK
  • Value Info: A


Cascade Attributes

Updates all occurrences of a value when the corresponding value in another table is changed.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class containing the field to monitor for changes Field triggering the cascading attributes CASCADE_ATTRIBUTE Input|Trigger|{Prompt}

Parameters

The method parameters are as follows:

Parameter Value Description
Input Table, layer, or feature class Table or feature layer containing the field affected by the cascading updates.
Trigger Field name Field affected by the cascading updates.
Prompt (Optional) Blank (Default) Display prompt to confirm the cascading update.
False Prompt will not display.

Examples

Monitors the FULLNAME field in the MasterStreetName table for changes; when this value is changed, copy this value to all features in the RoadCenterline layer whose STNAME field value is equal to the original FULLNAME field value. A dialog box will be displayed before the values are copied:

  • Table Name: MasterStreetName
  • Field Name: FULLNAME
  • Value Info: RoadCenterline|STNAME

Copies the field value without asking for confirmation:

  • Table Name: MasterStreetName
  • Field Name: FULLNAME
  • Value Info: RoadCenterline|STNAME|False


Expression

Executes a VBScript evaluated by the MSScriptControl. Can be used to access built-in functions and conditional logic (if statements).

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class Field on which the expression should be executed EXPRESSION VBScript Expression

This rule can be configured on any field type.

Parameters

In the expression, the edited field (field name listed in the Field column) can be indicated using [#] or the field name enclosed by [].

Additional functions

  • IIF(expression, truepart, falsepart): used to create complex If-Else statements; returns one of two objects, depending on the evaluation of an expression. Both the True and False portions of IIF statements must be able to be evaluated; functions cannot be used on Null values. For example, IIF(1=1, left(Null), "false") cannot evaluate.
  • TCase(string): returns a copy of the string converted to title case.
  • Ceil(number): returns the smallest integer greater than or equal to the specified number.
  • Floor(number): returns the largest integer less than or equal to the specified number.

Function notes

  • If specifying a decimal number in the equation, the decimal separator (radix point) must be a period:
    • Invalid: IIF([height]>12,5, "yes", "no")
    • Valid: IIF([height]>12.5, "yes", "no")
  • To perform string operations on GUID fields, the field name must be treated as a string:
    • Invalid: replace([GlobalID], "{", "")
    • Valid: replace("[GlobalID]", "{", "")
  • To set values as null, use "<NULL>" string:
    • Invalid: IIF([LOCDESC]=0, "", [LOCDESC])
    • Valid: IIF([LOCDESC]=0, "<NULL>", [LOCDESC])

Examples

Joins the FROMMH and TOMH fields in the gravityMains layer with a dash and removes all instances of "MH-", storing this value in the MHID field. In this example, if the FROMMH and TOMH fields have a value of "MH-001" and "MH-123", respectively, then the value "001-123" will be stored:

  • Table Name: gravityMains
  • Field Name: MHID
  • Value Info: replace(([FROMMH] & "-" & [TOMH]), "MH-", "")

Uses a lookup value in the DIAM field to store textual color representations in the COLORSYM field in the gravityMains layer. In this example, a value ≤6 is RED, >6 AND ≤10 is ORANGE, >10 AND ≤15 is GREEN, and >15 is BLUE:

  • Table Name: gravityMains
  • Field Name: COLORSYM
  • Value Info: IIF([DIAM]<=6, "RED", IIF([DIAM]<=10, "ORANGE", IIF([DIAM]<=15, "GREEN", "BLUE")))

Stores the ADDRESS field in the ADDRPROPER field, converting to title case if the UNIT field is not null. In this example, if the ADDRESS field is "forest grove ct" and the UNIT field is "101", then the value "Forest Grove Ct" will be stored; if UNIT is empty (null), then the value will remain the same:

  • Table Name: gravityMains
  • Field Name: ADDRPROPER
  • Value Info: IIF(isNull([UNIT]), [ADDRESS], TCase([ADDRESS]))


Feature Statistics

Summarizes the attribute values of the affected feature as a series of statistics or a single calculated value.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class Field to store the statistics FEATURE_STATS Source|Statistic|{Delimiter}|{SortOrder}

This rule can be configured on any field type, but a String field must be used if the Concat parameter is selected.

Parameters

The method parameters are as follows:

Parameter Value Description
Source Field name Numeric field to summarize; multiple fields can be specified as a comma-delimited list (for example, field1,field2,field3)
Statistic Min Minimum value
Max Maximum value
Sum Sum of all values
Mean Mean value
Concat Delimited string containing all the values with duplicates removed.
Delimiter (Optional) Any character except | is valid; the default is ,. Characters used as delimiters; only used when the statistic is Concat.
SortOrder (Optional) ASC Sort the statistics in ascending order; only used when the statistic is Concat.
DESC Sort the statistics in descending order; only used when the statistic is Concat.

Examples

Stores the maximum value of the POPMALE and POPFEMALE fields into the MAXPOP field in the serviceArea layer:

  • Table Name: serviceArea
  • Field Name: MAXPOP
  • Value Info: POPMALE,POPFEMALE|Sum

Stores a comma-delimited string of POPMALE and POPFEMALE values:

  • Table Name: serviceArea
  • Field Name: MAXPOP
  • Value Info: POPMALE,POPFEMALE|Concat

Stores a semicolon-delimited string, sorted in descending order:

  • Table Name: serviceArea
  • Field Name: MAXPOP
  • Value Info: POPMALE,POPFEMALE|Concat|;|DESC


Field

Copies the value from from one field to another within the same feature class.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class from which fields will be copied Field to populate FIELD Source|{Value}

Parameters

The method parameters are as follows:

Parameter Value Description
Source Field name Field from which the values will be copied from.
Value (Optional) CODE The code value will be copied for fields with subtypes and/or domains.
DISPLAY (Default) The display value will be copied for fields with subtypes and/or domains.

Examples

Copies the value from the CREATED field to the ASSIGNED field in all layers:

  • Table Name: *
  • Field Name: ASSIGNED
  • Value Info: CREATED

Copies the domain display value from the MATERIAL field to the TYPE field in the wGravityMains layer:

  • Table Name: wGravityMains
  • Field Name: TYPE
  • Value Info: MATERIAL|DISPLAY


Field Trigger

Updates a field to a specified value when the value of another field is updated.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class Field to monitor for changes FIELD_TRIGGER Trigger|Target|Value

This rule can be configured on any field type.

Parameters

The method parameters are as follows:

Parameter Value Description
Trigger String or number This value causes the target field to update.
Target Field name Field to update.
Value String or number The target field is updated to this value.

Examples

Monitors the STATUS field in the wGravityMains layer; whenever the value is changed to ABANDONED, store NONE in the PRESSUREZONE field:

  • Table Name: wGravityMains
  • Field Name: STATUS
  • Value Info: ABANDONED|PRESSUREZONE|NONE


Junction Rotation

Stores the rotation angle of a junction feature based on connected edge features.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Point feature class Field to store the rotation angle JUNCTION_ROTATION {Type}|{Additional}|{Special}|{Source}

This rule can only be configured on Floating, Integer, or Double fields.

Parameters

The method parameters are as follows:

Parameter Value Description
Type (Optional) A Arithmetic rotation (counter-clockwise from positive X axis).
G (Default) Geographic rotation (clockwise from positive Y axis).
Additional (Optional) Value Additional degrees to rotate the features.
Special (Optional) Numeric field name Features will be spun from the smaller to the larger value. For example, you can use this for reducer fittings and the diameter field of the mains so the reducer is properly oriented.
Source (Optional) Feature class

Rotation will be calculated based on angle of features only in this layer.

Note: The database name of the feature class must be used.

Examples

Stores the geographic rotation of the junction in the ROT field in the junctions layer:

  • Table Name: junctions
  • Field Name: ROT
  • Value Info: <Null>

Stores the geographic rotation of the junction plus an additional 90-degree rotation in the ROT field in the junctions layer. Only the ssLateralLines edge layer will be used to determine rotation and the rotation value will be oriented from smaller to larger:

  • Table Name: junctions
  • Field Name: ROT
  • Value Info: |90|DIAMETER|ssLateralLines


Last Value

Repeats the last value used in a field.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class The field in which the value will be repeated LAST_VALUE Null Values|Default|On Create

This rule can be configured on any field type.

Parameters

The method parameters are as follows:

Parameter Value Description
Null Values True Only affects null values.
False Overwrites all field values.
Default Value The value to enter in the field if there is no last value.
On Create (Optional) True The value of created features overwrites the last value array. This is the default behavior if no parameter is set.
False The value of created features does not overwrite the last value array.

Examples

Copies the value last entered in the TYPE field in the wMain layer, overwriting existing field values; if there isn't a previous value, use PVC:

  • Table Name: wMain
  • Field Name: TYPE
  • Value Info: False|PVC


Map Info

Stores information from the current map document metadata or the version info of the layer being edited.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or Feature Class The field in which the value will be stored MAP_INFO Property Type|{Field to Monitor}

This rule can only be configured on text fields.

Parameters

The method parameters are as follows:

Parameter Value Description
Property Type AUTHOR The map document author.
NAME The map document name (filename without extension).
PATH The map document path (folder containing the map document).
TITLE The map document title.
VERSION The version name of the layer being edited. When editing a non-versioned dataset, FGDB will be stored.
Field to Monitor (Optional) Field name The field to monitor for changes.

Examples

Stores the author from the map document properties in the AUTH field in the ProposedSites layer:

  • Table Name: ProposedSites
  • Field Name: AUTH
  • Value Info: AUTHOR

Stores the workspace version of the ProposedSites layer whenever a value in the LASTEDITOR field is changed:

  • Table Name: ProposedSites
  • Field Name: AUTH
  • Value Info: VERSION|LASTEDITOR


Previous Value

Monitors a field, and when it is changed, stores the previous value in another field.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class Field to monitor for changes PREVIOUS_VALUE Field

Parameters

The method parameters are as follows:

Parameter Value Description
Field Field name Field to store the previous value

Examples

Monitors the ADDRESS field in the streets layer for changes and copies the original value to the LASTADDR field:

  • Table Name: streets
  • Field Name: ADDRESS
  • Value Info: LASTADDR


Prompt

Identifies records containing null values. If the field uses a subtype or domain, those options are presented in the dialog box for the user to select.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Table or feature class List of fields to search in the format field1,field2,etc. PROMPT Null or blank

This rule can be configured on any field type.

Parameters

There are no parameters for this method.

Examples

Identify records with null values in the FACILITYID, DIAMETER, and/or TYPE fields in the wLateralLine layer:

  • Table Name: wLateralLine
  • Field Name: FACILITYID,DIAMETER,TYPE
  • Value Info: <Null>


Side

Determines if a point feature is to the left or right of a corresponding line feature.

To configure this method, populate the following in the DynamicValue table:

Table Name Field Name Value Method Value Info
Feature class Field to contain side value SIDE Source|Primary Key|Foreign Key

This rule can only be configured on point features, and the value must be populated in a String field.

Parameters

The method parameters are as follows:

Parameter Value Description
Source Layer or feature class Line features
Primary Key Field name Identifying field for line features in the line feature class
Foreign Key Field name Field in the point feature class containing the identifiers of the corresponding line features

Examples

Copies the value "Right" or "Left" into the SIDE field in the address layer. The STNAME field in the address layer is used to find the line feature with the same value in the STREET field in the masterStreets layer:

  • Table Name: address
  • Field Name: SIDE
  • Value Info: masterStreets|STREET|STNAME


Top