Skip to main content

Attribute Sets

The attribute sets are libraries of reusable attributes. In the templates section of the administration, click the Attribute sets tab to manage the set of attributes. The attributes defined here can then be used in different templates.

Attribute sets
To add a new set, you have to click on the Add attribute set button, and then it is sufficient to specify a unique name. Moreover, you can select an existing set to see all the associated attribute definitions.
On the right side of the Properties panel you can define a new attribute by filling the Attribute name and clicking on Save, the new attribute will appear in the Attributes list. You can reorder the position of the elements in the list, and of course you can select whatever attribute and modify its definition at any time.

Presets

For the attributes of type String, you can also define the Input Mode preset that will display to the end user a list of possible options to choose. The options can be managed by clicking on Attribute options.
 
 
You can also Import and Export huge lists of options in CSV format.

Initialization

For each attribute, you may write your initialization script that will be used to initialize the initial value of the attributes.
Attribute sets
If you click in the cog icon of the Initialization field, a wizard will help you in generating the most common initialization scripts for that attribute type. In your script, you do your elaborations and update the variable $attribute accordingly.

Dictionary available for the Automation in this context

AUTOMATION CONTEXT: INITIALIZATION
VariableJava ClassDescription
objectExtensibleObjectthe object under initialization, for instance a Document or a Folder
eventHistorythe current event
attributeNamename of the current attribute being initialized
attributeAttributethe current attribute being initialized

Read the Automation manual for more information.

Validation

For each attribute, you may write your validation script that will be used to validate the input of the user. In your script you do your checks and in case of invalid value, put the reason of the error in the variable $error.
Attribute sets
If you click in the cog icon of the Validation field, a wizard will help you in generating the most common validator scripts for that attribute type.

Dictionary available for the Automation in this context

AUTOMATION CONTEXT: VALIDATION
VariableJava ClassDescription
objectExtensibleObjectthe object under validation, for instance a Document or a Folder
eventHistorythe current event
errorsmap of strings. Key is the attribute name, Value is the error description
attributeNamename of the current attribute being validated (only available in attribute validator)
attributeAttributethe current attribute being validated (only available in attribute validator)
valuevalue of the current attribute being validated (only available in attribute validator)
errorValidationErrorkeeps the error description of the current attribute being validated (only available in attribute validator)

Read the Automation manual for more information.