Controlled vocabularies in PromoMats allow you to restrict picklist options based on other field values and to prompt users to enter field information during workflow tasks. You can configure controlled vocabularies on document and object fields.
Note: If you previously configured picklists with field dependencies to restrict available values based on document properties, we recommend creating controlled vocabularies with this information before deactivating the picklists.
Configuring Vocabularies
To create controlled vocabularies:
- Navigate to Business Admin > Picklists > Controlled Vocabulary Type.
- Click Edit.
- Enter a Picklist Value Label, then press the Enter key or click .
- Navigate to Business Admin > Objects > Controlled Vocabularies.
- Click Create.
- Enter a Controlled Vocabulary Name. Controlled Vocabulary Names are the picklist options.
- Optional: Enter an Abbreviation.
- Select a corresponding Controlled Vocabulary Type.
- Click Save to finish or click Save + Create to create additional vocabularies.
Once you create controlled vocabularies, you can begin applying constraints.
Adding Constraints
The Constraint object stores allowed metadata combinations. You can use the Constraint object to define when users can select controlled vocabularies. The constraint’s object types indicates which values the CV fields represent. For example, if you create a Constraint object record with the type Submission, the CV1 field on the Constraint contains submission types while the CV2 field contains health authority decisions.
Adding Constraint Object Types
You can create new Constraint object types if your Controlled Vocabulary is unrelated to the existing types, or if you have already added criteria VQL expressions to the CV fields in the existing object types.
To add a new object type:
- Navigate to Admin > Configuration > Objects > Constraint > Object Types.
- Enter a Label.
- Enter a Plural Label.
- Enter a Name.
- Click Save.
- Click the Actions menu and select Edit Object Type Fields.
- Select the appropriate fields, including one (1) or all of the CV fields, then click Save.
Next, you can create reference constraints:
- Navigate to Admin > Configuration > Objects > Constraint > Object Types.
- Click the object type label, then select one of the CV fields.
- Click Edit.
- Set up a reference constraint.
- Click Save.
Create Constraint Records
To create Constraint records:
- Navigate to Business Admin > Objects > Constraints.
- Click Create.
- Select a Constraint Type.
- Optional: Select a Country.
- Optional: Select a CV1. This references a Controlled Vocabulary.
- Optional: Repeat step 5 for any other CV fields.
- Optional: Select a Product.
- Click Save to finish or click Save + Create to create additional constraints.
Download this CSV file to load our recommended constraints. You can also use it as a starting point when creating unique constraint records using Vault Loader.
Creating Document & Object Fields
You can apply controlled vocabularies to both document and object fields.
To apply controlled vocabularies to fields:
- Create a new document field or object field. Select Object as the Field Type and Controlled Vocabulary (controlled_vocabulary__v) as the Object.
- Click Save.
- Find and click on the new field name.
- Click Edit.
- Set up a reference constraint.
- Click Save.
The following table includes the relationship names for each CV field on the Constraint object:
Field | Relatonship Name |
---|---|
CV1 | constraints1__vr |
CV2 | constraints2__vr |
CV3 | constraints3__vr |
CV4 | constraints4__vr |
By default, the Health Authority Submission and Health Authority Decision document fields include reference constraints. The Health Authority Decision field, for instance, includes the following reference constraint:
id IN (SELECT id FROM constraints2__vr WHERE cv1__v CONTAINS ), id IN (SELECT id FROM constraints2__vr WHERE country__v CONTAINS ), controlled_vocabulary_type__v = 'health_authority_decision__v', status__v != 'inactive__v'
Adding Fields to Workflow Prompts
When adding these document or object fields to workflow task prompts, you must include the fields on which the values are dependent. For example, if you add the Health Authority Submission document field to a task prompt, you must also add the Country field to the task prompt. This allows Vault to read the reference constraint, which contains a dependency on the Country.
Related Permissions
If users cannot see available values when populating document or object fields referring to Controlled Vocabularies, ensure their permission set includes Read permissions for the Controlled Vocabulary and Constraint objects.
You can complete all steps in this article with the standard Business Admin, System Admin, or Vault Owner profile. If your vault uses custom security profiles, your profile must grant the following permissions:
Type | Permission Label | Controls |
---|---|---|
Security Profile | Objects: Constraint: Read, Create, Edit, Delete | Grants ability to view, edit, and manage Constraint object records. |
Security Profile | Objects: Controlled Vocabulary: Read, Create, Edit, Delete | Grants ability to view, edit, and manage Controlled Vocabulary object records. |