Data Management Experience Metadata Entry
With metadata templates, the Data Management Experience metadata entry form uses the template as the source of truth for which metadata fields show up, instead of using the domain configuration.
Metadata validation can take on any form you can express in a SoQL expression. Because each metadata validation expression can return an error
, just like with data validation, it is displayed in the user interface as whatever the user chooses to return. This means the little red error messages next to each field can say whatever you'd like. Take for example this expression:
case(
to_number(@some_fieldset.`simple_validation`) < 5,
@some_fieldset.`simple_validation`,
true, error('field needs to be < 5')
)
Metadata Transformation
Metadata fields can be transformed, just like dataset data. Whenever the output of a metadata expression differs from the input, we show an element that displays the output. There is also help text that describes what is happening.
Take the following expression:
case(
@some_fieldset.`simple_transformation` == 'a', 'the user entered a',
@some_fieldset.`simple_transformation` == 'b', 'the user entered b',
@some_fieldset.`simple_transformation` == 'c', 'the user entered c',
true, @some_fieldset.`simple_transformation`
)
For the inputs, a, b, and c, the result of this expression is not the same as the input. For other values, it's just whatever the user entered.
Custom SoQL expressions
The SoQL expression editor associated with each field is accessible at the top right of the field manager. Admins are free to define whatever expression they see fit for the metadata field. The constraints are the same as data transformations, i.e., it produces a single value. The "columns" available to reference are the metadata input fields they have defined. See the example in the screenshot below
It works in the same way as data transformations, with the same functions available. The documentation is available below the editor, similar to our Data Management Experience.
Comments
Article is closed for comments.