Metadata Expressions
Introduced in version
23.1
Added the method
F
in version24.3
Introduction
From version 23.1
you can create a batch offering rich metadata expressions where the new metadata of the item can be determined by
The (previous) metadata of the item
Combinations of fields
Conditions
Textual operations
Usage
The expressions are currently used in the following cases
Methods
Each pattern #{...}
in the expression string will be evaluated using the Spring Expression Language. Inside an expression, you can reference the metadata using R(<Dotted key>)
for example R('Descriptive.Title')
or F('Descriptive.Title')
.
Only dotted keys referring to a field definition present in the system are allowed
Method | Effect | Since |
---|---|---|
| Outputs the value of the metadata field as defined in the table below: Batch Metadata Expressions | The output of the metadata accessor |
|
| Similar to |
|
| Similar to |
|
| Similar to |
|
The output of the metadata accessor
The output of the metadata accessor R
or record
is the following depending on which field type the dotted key refers to:
Level | Case | Effect | Accessor R | Accessor R Output | Accessor F | Accessor F Output |
---|---|---|---|---|---|---|
Top | SimpleField | String |
|
|
|
|
Top | ListField | List of Strings |
|
|
|
|
Top | MapField | Map of Strings |
|
|
| Not allowed |
Top | MultiItemField | Map of List of Strings |
|
|
| Not allowed |
Top | Others
| Not allowed |
| Not allowed |
| Not allowed |
Sub | Child of ListField | List of Strings |
|
|
|
|
Sub | Child of MultiItemField | List of Strings |
|
|
|
|
Sub | Child of MapField | String |
|
|
|
|
Sub | Other | Not allowed |
| Not allowed |
| Not allowed |
Variants
The expression can formulated in two manners
Multiple Spel expressions with textual information in between
text A #{...} text B #{...}
A single Spel expression using
#{...}
where extra text needs to be concatenated using+
Multiple Spel = #{R('Descriptive.Title')} - #{R('Descriptive.Description')}
Single Spel = #{R('Descriptive.Title') + ' - ' + R('Descriptive.Description')}
Restrictions
The available features of SPel are for security reasons restricted to the following patterns
Literal expressions
Boolean and relational operators
Inline lists, maps, etc
Ternary operator
The method named “R”, “F” or “record”