Skip to main content
All CollectionsAdvanced automationDatasheets
Establishing dependencies between attributes and across Datasheets in a Datasheet question
Establishing dependencies between attributes and across Datasheets in a Datasheet question

How to build dependencies between attributes and across Datasheets in a Datasheet question

Lorraine avatar
Written by Lorraine
Updated over 9 months ago

You are able to establish dependencies between attributes. For example, in accordance with the Datasheet below, you might wish to set up a questionnaire such that if “Maya” is selected as a First Name, “Rudolph” will automatically be filled in as the person’s Last Name.

To start off, create two placeholders in your template, as shown below.

Then, navigate to the questionnaire tab. Set up the “First Name” question in the manner described under the “Creating a Datasheet question” section. Once you are done, your “First Name” question should look like the image below.

Now, navigate to the “Last Name” question. Set up the “Last Name” question in the manner described under the “Creating a Datasheet question” section.

A new menu should have appeared in the “Last Name” question card with the header “Attribute in questionnaire to depend on”. Select “First Name” from the dropdown. Another menu should now have appeared in the “Last Name” question card with the header “Select column header from [Datasheet name] Datasheet”. Select “First_name” from the dropdown.

Once you are done, your “Last Name” question should look like the image below.

If you wish to add multiple dependencies, click the ‘Add’ button and fill in the menu as you did in the step above. Do note that these dependencies will always be additive, meaning that all dependencies must be satisfied in order to produce an output

Save the template after you have made these changes. You can now test your template out by generating a document.

If you select a specific first name, the person’s last name should automatically appear.

However, in the case that there are two attributes repeated with different dependencies you will be able to select the applicable dependent attribute. In the example we have two individuals with the same first name, therefore, you will be provided the option of selecting between the two available last names. For example, there may be a John Kujo in your Datasheet alongside a John Joestar.

Establishing dependencies across Datasheets in a Datasheet question

You are also able to establish dependencies across Datasheets. For example, a value from a column in Datasheet 1 could trigger a corresponding value from a column in Datasheet 2 to be surfaced.

For example, we can set up the dependency such that the value “Company A” from Datasheet 1 will trigger “Leonard” and “Spock” from Datasheet 2 to appear.

First, set up the template to look like the one below.

Then, navigate to the questionnaire and set up the Company Name question card. For example, if we select “Sample Datasheet 1” as the relevant Datasheet, followed by the “Company_name” attribute as the header. The Company Name question will now surface a list of company names from Datasheet 1.

Following this, we can set up the question card for First Name. For example, we select “Sample Datasheet 2” as the relevant Datasheet, followed by the “First_name” attribute as the header. The First Name question will now surface a list of first names from Datasheet 2.

Now, we will have to set up the question card such that it depends on the “Company Name” attribute. We will set the “Attribute in the questionnaire to depend on” as “Company Name” followed by “Company_name” as the column header.

We then repeat the same process with the Last Name question card.

Once you have made your edits, save the template. You can now press “Create document” to generate the document. Selecting a Company Name from Datasheet 1 should now automatically surface a corresponding First and Last Name from Datasheet 2.

Did this answer your question?