Learn about how to create multiple sets of dependencies within a dataset with Dependency variants. 

 



 

A dependency variant is essentially a variation of a set of dependencies. By creating different set of dependencies within a dataset, you can tailor the relationships between datasets to suit different needs in various scenarios. This allows for flexibility while ensuring consistency in the data across various fields.

 


Dependencies define the relationships between different options in datasets. For example, when a dataset is used in a dropdown B, dependencies determine which options are available based on the selection made in another dropdown A.


By creating different sets of dependencies, users can customize how these relationships between these fields work in different situations. For instance, they might want one set of dependencies for a specific field and a different set for another field in the Create form, even if they both use the same dataset. 


This allows you for both flexibility to further customize how fields interact within the Create form, while also maintaining consistency in your data.


Note on terminology with example (click here)


If you're not familiar with all the terminology around dependencies, here's a short explanation of its main elements along with an example.

 

Dependency variants

Variations of sets of dependent relations within a dataset. Each variation represents a unique configuration of dependencies that can be tailored to specific needs. For instance: 

  • Variant 1: Dataset C depends on Dataset A.
  • Variant 2: Dataset C depends on Dataset B.

 

Dependency relations

It denotes the dependent relations between datasets. E.g., in Variant 1, Dataset C depends on the dictating Dataset A.

 

Permutations/dependency combinations

It denotes the table of permutations between datasets. In simple words, the specific sets of selections in the dictating dataset that determine different combinations of allowed options in the dependent dataset.

 

Dependency options

It denotes the (sub)set of value options in the dependent dataset that are part of a dependency.

 

Allowed options

The options available in the dependent dataset based on the combination of options selected in the datasets it depends on.

 

Example

Variant: Variation 1

 

Dependencies:

Dataset C options (a, b, 1, 2, #) depend on the selected option in Dataset A (Letters, Numbers).

 

Permutations:

• For option 'Letters' of Dataset A, the following options are available for Dataset C 'a, b'

• For option 'Numbers' of Dataset A, the following options are available for Dataset C '1, 2'

 

Dependency options:

'Letter, Numbers' and 'a, b, 1, 2'

 

 

Variant: Variation 2

Dependencies:

Dataset C options (a, b, 1, 2, #) depend on the selected option in Dataset B (Characters, Symbols).

 

Permutations:

• For option 'Characters' of Dataset B, the following options are available for Dataset C 'a, b, 1, 2'

• For option 'Symbols' of Dataset B, the following options are available for Dataset C '#'

 

Dependency options:

'Letter, Numbers' and 'a, b, 1, 2, #'



 

Adding a dependency variant

Dependency variants, like other dataset configurations, are created and managed through the Dataset manager. Each dataset inherently includes at least one dependency variant.

 

Within the Dataset manager, click on the ‘Dependency variant’ tab

 

Here, you’ll find an area for setting dependencies and subsequently define allowed options based on different selections. Initially, this section will be empty.


 

By the ‘Dependency variant’ tab, you’ll find a ‘Add variant’ button. This remains disabled until the existing dependency variants have at least one dependency configured.

 

Once configured, the ‘Add variant’ button will activate to allow you to create a new variation of your dependencies. 

 

At this point, you can proceed to name your new dependency variant and a new dependency variant tab will appear. 

 

Click ‘Add variation’ > Give it a name > ‘Publish’

 


Configuring dependencies

To configure dependencies within a dependency variation, you can refer to the Dataset Manager article for detailed instructions.

 

However, here's an overview of how it works:


  1. Build the dependency relations

Search and select any dictating datasets > 'Publish'

 

  1. Define a combination of options

Select the options in the dictating fields that should lead to the allowed options for the dependent dataset. 

 

  1. Assign allowed options

Assign allowed options by linking the option of the dependent dataset to the current selection of options in the dictating datasets.

 

  1. Set different combinations

Repeat steps 2 to 3 as needed. 

 

  1. Publish

 


Once configured, your dependency variant will be ready to be used in fields when adding a dataset.
 



Managing a dependency variation

You have several options for managing a dependency variant by clicking on the more menu (...) on the top right: 

 

Duplicate variant

It creates a copy of the dependency variant along with its configuration. Upon duplication, a new tab will appear with the copied settings.

 

Rename variant 

It lets you change the name of the dependency variant. A dependency variant name is displayed on the tab, right below 'Dependency Variant'.

 

Delete variant

It permanently removes the dependency variant along with its tab and configuration. 


Note: There must always be a dependency variant in a dataset. Hence, the last remaining dependency variant cannot be deleted.

 

Reset dependencies

It clears all dependencies within a dependency variant, effectively removing its dependent relations, all combinations of selections, and their allowed options. 

 

 

 

Using dependency variants

When working with multiple dependency variants, you'll be asked to select the one you want to apply for a specific action you're trying to perform. This includes scenarios such as:

 

  • Adding a dataset with dependencies to a field
  • Including dependencies from field settings
  • Importing dataset with dependencies

 


Adding a dataset to a field

When adding a dataset with dependencies to a select field, you have the option to include or exclude dependencies. If you choose to include dependencies and there are multiple dependency variants available, you need to select the specific variant to apply to that field.



Check ‘Include dependencies’ > Select the dependency variant you want to use > ‘Add’

 

After selecting a dependency variant, you'll see all the datasets that are required for the dependencies to be applied correctly. Additionally, you'll see in which fields those datasets can be found. If a dataset is not found, you'll need to add it first. If a dataset is found in more than one field, you'll need to choose which field to use as part of the dependency.

 

Once added, you can view information about which dependency variant is in use for the field from the field settings.

 

Click the cog icon > Locate ‘Include dependencies’

 

 

Include dependencies setting

In a field where a dataset is already in use, you can include dependencies at a later stage, if the dataset has them.

 

Click the cog icon > Check ‘Include dependencies’

 

This action will open a modal where you can decide which dependency variant to use if you have multiple variants available.



After selecting a dependency variant, you'll see all the datasets that are required for the dependencies to be applied correctly. Additionally, you'll see in which fields those datasets can be found. If a dataset is not found, you'll need to add it first. If a dataset is found in more than on field, you'll need to choose which field to use as part of the dependency relation.

 

Once added, you can view information about which dependency variant is in use for the field under the same ‘Include dependencies’ setting. 

 

 

Import dataset with dependencies

When importing a dataset with dependencies, you may need to specify the dependency variant you want to update or import for, depending on the context.



So first, you need to select a dependency variant to generate a template you can use. Then, you can proceed with the import as you would normally. 

 

Learn more about importing a dataset here