Operator Type:
Operator Scope of Action:
Operator Purpose:
Operator First Added:
Operator Altered:
Function [other Function type actions]
Document [operators of similar scope]
Document configuration [other Document configuration operators]
9.0.0
attribute("attributeName")["key"]
An operator that, for the specified attribute attributeName, returns a Dictionary of key values that describe that attribute. Current keys include (names are all-lowercase and case-sensitive):
- category: the category (group) in which the attribute appears
- default: the default value
- suggested: the suggested values (if set)
- type: a string describing the data type of the attribute
- description: a short description the the attribute (for user attributes, if set)
attribute("attributeName").keys
Being a Dictionary operator, it is possible to retrieve all the above as a list of key:value pairs. Note that any attribute name (any valid name) must be supplied as first argument:
$MyList = attribute("Width").keys;
returns the entire contents of the Dictionary key:value pairs for the attribute Width
. Keys are returned in the order listed above, and not in alphabetical order—as might be intuited.
A more useful method is to iterate the list of the Dictionary's keys:
$MyString =;
attribute("Width").keys.each[aKey]{
$MyString = $MyString + document[aKey] + "\n";
};
If any key is not set, e.g. there are no 'suggested' values, then an empty string is returned for that key.
All keys return as string, but the most appropriate attribute type is shown as the recipient of the data:
$MyList = attribute("Width")["default"]
$MyList = attribute("Width")["suggested"]
$MyString = attribute("Width")["category"]
$MyString = attribute("Width")["type"]
$MyString = attribute("Width")["description"]
Actions may modify the default or suggested values of an attribute:
attribute("attributeName")["suggested"]="value 1; value 2";
sets two values for the attribute's suggested values list. Likewise a default value can be set:
attribute("attributeName")["default"]="value 1";