Creating Custom Metadata

Table of Contents

1. Overview

2. How to Get Started

3. Categories

4. Custom Fields

4.1 Custom SoQL expressions

4.2 Custom Metadata Field Types

4.3 Conditional Metadata

4.4 Custom Metadata Field Permissions

4.5 Custom Fields Management

4.6 Child Views Can Inherit Metadata from Parents

5. Metadata audit

 

Overview

Metadata templates are a collection of fieldsets and custom fields, similar to custom metadata but with additional features and a new interface. 

The addition is that fields have a SoQL expression associated with them which allows a site administrator to define custom validation. Before validation was limited to required fields or optional fields, now validation can take on any form you can express in a SoQL expression.

 

NOTE: Metadata templates do not change how metadata is stored, used, or rendered on the platform. Metadata templates will also not delete any existing metadata that has already been configured on a domain. Find more information on the new feature here Metadata Templates

 

How to Get Started

To access metadata templates, a roled user with the required permissions, e.g. an Administrator will navigate to the Metadata page within the Administration Panel on your domain.

 

met1.png

 

The new metadata templates page will have a different UI with three main sections including a new section labeled Audit Metadata as shown below:

metadata admin2.png

 

 

Categories

With Metadata Templates, site administrators can add, delete, and manage new and existing categories.

Admins will have the ability to hide/unhide them from the catalog and delete them if needed. 

 

To add a new Category... 

1. Enter the new category name

2. If adding a secondary category, select a parent category from the dropdown. 

3. Click on Save.

4. The new category will be hidden from the catalog by default. To unhide it, click on the checkbox for the category under Shown on the grid

 

NOTE: All category names have to be unique. Attempting to duplicate a category will result in the following error

 

213.png

 

Custom Fields

The UI for metadata templates re-uses the patterns from VQE (Exploration Canvas) to render certain SoQL expressions as easy-to-use UI components. Similarly, there are UI components that generate SoQL expressions without having to write SoQL. These pre-defined components and metadata field types are:

  • Text field
  • Select drop-down
  • Multi-select drop-down
  • Conditional metadata
  • Default Value

Custom Metadata Field Permissions:

  • Required metadata
  • Optional metadata field
  • Private metadata field
  • Public metadata filed

You can learn more about each of the above at the bottom of this page. Now, let's use an example scenario to go over the new features and workflow for adding and managing field sets and fields:

For example, to add a field set labeled 'Test Field Set' with a field labeled 'Test Field'

 

1. Click on the Add Field Set button, type in a fieldset label, and click on Save

2. Click on Add Field and type in the fields name. 

3. Once added, selecting the added field will show more options as shown below. 

 

4. By just adding a field a SoQL query is generated automatically. To view the query, click on the blue Test & Edit SoQL validation button.

 

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, as in, it produces a single value. The "columns" available to reference are the metadata input fields they have defined.

It works in the same way as data transformations, with the same functions available. The documentation is available below the editor, just as it is in the dataset management interface. More information on metadata validation using SoQL can be found here. 

morn3.png

 

Custom Metadata Field Types

Text fields and default values

Text type metadata fields have free text options that will allow users to input free text into the metadata field when publishing assets.

An administrator can also define a default value for a text field which will auto-populate in a given metadata field when an asset is being published.

Note: Default values are only available for text-type metadata fields.

Administrators can make a field a drop-down of pre-defined value options. This drop-down can either be single-select or multi-select, depending on the metadata needs a program may have.

 

Conditional Metadata

Conditional metadata allows administrators to create relationships between metadata fields option is only available for drop-downs at this time. When configured,  the drop-down field will only render a subset of its options based on the value selected in another metadata field within the same fieldset.

To illustrate, we can see in the screenshot below that we have a 'select' metadata field titled “Test” with values based on the 'Dog' value in the 'Animal' metadata field(selected as the parent field). 

2024-03-20 15_09_34-Metadata _ Tyler Data & Insights.png

 

If a conditional metadata field is added, publishers will only see the parent, in this case “Animal” field, initially when publishing. Once a value is selected in the parent field, the child field will render with only the appropriate subset of options to choose from.

Custom Metadata Field Permissions

Custom metadata field permissions can be found on the right side of a metadata field card, and are set on a field-by-field basis.

 

field permission.png

Permission

Description

Required

Required metadata fields must be filled in before publishing the asset. If the field is not filled in on an asset, it cannot be published.

Optional

Optional metadata fields do not need to be filled in for an asset to be published.

Private

Private fields are only visible to roled users.

Public

Public fields are viewable by any user who can view the metadata for a particular asset.

 

Custom Fields Management

Once you have created your custom fields and field sets, you can re-order them by dragging and dropping. Fields can be re-ordered within the field set they are contained in, and the order of field sets can be adjusted as well. Re-ordering your field and field sets will change the order these components render on both the publishing modal for data publishers and on the Overview Page for any users who land there.

metadata order 1.png

Like all metadata template changes, these new features will only affect newly published assets. If you want the new order to appear on older assets, you must republish the old assets.  This will cause the modified metadata template to be applied to that asset.

 

Child Views Can Inherit Metadata from Parents

In addition to re-ordering your metadata, users with access to the metadata template can also decide whether they want filtered views to inherit custom metadata from the parent asset. By checking the box in the image below, all filtered views will inherit metadata values from its parent. These values can still be edited by the publisher. If the box is not checked, no metadata values will be passed from the parent asset to the filtered view.

metadata order 2.png

 

Metadata audit

The metadata audit tool allows an admin to run metadata validation against existing assets. It uses the common catalog components to display and interact with the list of assets on the domain. 

audit.png

Clicking on the link in the Metadata Status column opens a modal that displays the error messages produced by the SoQL expression. 

morn_5.png

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.