Metadata composers
This module computes the value of a metadata automatically from other metadata, for events that depend on no application, the synchronization.
It is the equivalent, at the general settings level, of the metadata composer of an application.
The value can be produced by:
- A combination of other metadata
- A computation
- A counter
Several configurations can be created, then called from the flows.
Configuration
Name: name of the configuration
Metadata: metadata that is filled in or changed
Template: expression that produces the value, described below
In the Template field, typing ctrl + space after a character shows the assistance.
Only the metadata supplied in the synchronization message is usable by the composer.
Template
A template is a text where the values to insert are noted ${...}. Everything outside those wildcards is kept as is. The full syntax (available wildcards, indexing of the multiple values, transformation operations) is described in Wildcards and operations.
${core.name}_${extended.application_date | format('yyyy') | lowercase}
${standard.authors[0] | uppercase}
If a target metadata is multi-valued and the template itself retrieves a multi-valued metadata, the template is applied to each of the retrieved values to form the set of the new values.
Preview the result
The "preview" button shows the result of the template on a real document.
The GQL query looks for the documents the template is tested on. Run it with the "Run query" button. Once the query has run, select a document to apply the template to it: the result appears below the list.
Flows
This module can be used in the following flow: