The System Attributes module allows the addition of custom data fields to a range of areas within Scripting. This allows useful information to be displayed directly where it might be required by users, such as storing client contact details in the
Workflow Properties view:
How To
System Attributes can be added to a Campaign, Campaign Alias, Group, Workflow, or User. After selecting the desired object from the Object Type list at the left, then options can be added with the Add button in the top-right:
Once some options have been added, they can then be configured.
The Name field for an option is what is displayed to the user in the UI.
The Type and Default Value fields define the characteristics of the input field that the user can view and interact with. There are seven possible types:
Type
|
Description
|
Default Value
|
Date
|
Displays a date to the user, which can be edited with a calendar picker. The displayed date is formatted according to the culture settings of the user to last alter it.
|
Click the calendar icon to choose a default value.
|
Date & Time
|
Displays a date and time to the user, which can be edited with a calendar and time picker. The displayed date and time are formatted according to the culture settings of the user to last alter it.
|
Click the calendar icon to choose a default value.
|
Dropdown List
|
Displays a list box to the user, which allows selection from a list of pre-defined options. The options are are added and configured through the Option Selector.
|
The top-most option specified is the default.
|
Text
|
Displays a text box to the user, which can be edited directly.
|
Any entered text will be displayed by default.
|
Textarea
|
Displays a textarea to the user, which can be edited directly.
|
Any entered text will be displayed by default.
|
Time
|
Displays a time to the user, which can be edited with a time picker. The displayed time is formatted according to the culture settings of the user to last alter it.
|
Click the clock icon to choose a default value.
|
Toggle
|
Displays a Tick/Cross toggle button to the user, which can be toggled directly.
|
The selected state is the default.
|
The Mask field is only offered for the Text and Textarea types, and allows an alpha/numeric input mask to be added to these fields. Any characters entered into the Mask field will be shown by default and unable to be changed, with the exception of the characters "a" and "9". Any instances of a or 9 will be displayed as a dash ( - ), and only allow replacement with an alpha or numeric character respectively:
Advanced
Database
System Attributes can be set and read in the relevant UI for the section they're defined for, or the Scripting database. Within the Scripting database, they're stored across two tables: tbl_systemAttributeDefinitions and tbl_systemAttributeValues. tbl_systemAttributeDefinitions contains the configuration for the general attributes that are used in all locations where that System Attribute is used, and tbl_systemAttributeValues contains actual values stored for a System Attribute against a specific location.
Be aware that if a value is simply left as the default it will not have an entry created in tbl_systemAttributeValues, so as to avoid data duplication.
Default Values
As a result of the efforts to avoid data duplication in System Attributes, there can be some unexpected behaviour surrounding Default Values if they aren't properly understood. Unless a value is altered, then it will simply inherit from the Default Value (if one is specified). As a result of this, if the Default Value is changed for that System Attribute at a later date, then any instances that haven't had their value altered will now inherit the new Default Value. This may appear that the displayed data has altered some situations where it wasn't intended to, but this can be avoided by simply altering the value and reverting it to the desired value prior to altering the Default Value.