System AttributesThe 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 ToSystem 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:
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:
AdvancedDatabase
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.
|