Skip to main content

Set up variables in your templates

Martina avatar
Written by Martina
Updated this week

A VARIABLE is an essential component that you need to set up in your template if you want to perform calculations.

Essentially, setting a variable is the first step you need to take for any calculation. If your template doesn't have a variable, you won't be able to add calculations.

For example, if we create the "price" variable and set its default value at 0. This value can evolve according to the answers given to the form, through calculations.

💡 A variable represents a base value, which can change and evolve through calculations based on the answers to various questions.

1. Variable types

When creating a variable, you can choose between:

  • Number variables – used for numeric values and calculations

  • Options list variables – used to store predefined text values

👉 To learn how options list variables work and when to use them, see the article Options list variables.

2. So, how can I set up a variable in my template?

1️⃣ First, either create a new template or choose an existing one, and then click on Edit template.

2️⃣ In the EDIT tab of the template, you will see the Variables tab next to the Content and template Settings tabs.

3️⃣ Hit the ➕ Add variable button. A new window will pop up, allowing you to choose between a Number o Options list variable.

4️⃣ Click Next and to set the (i) name and (ii) initial value of the variable.

⚠️ When naming your variable, bear in mind:

  • Accents are not allowed

  • Use underscores (_) instead of spaces (e.g. company_name)

  • Do not use symbols other than the underscore

  • It cannot start with numbers or use only numbers

  • Your variable name should not duplicate any reference from the parallel.

If you still don't know what references in Parallel are, read this article 📖.

5️⃣ You got it! You can now perform calculations in relation to this variable.

3. How can I edit or delete a variable?

Once you've added a variable, you can't change its name, but you can adjust the initial value.

To do this, go to the edit button, next to the variable:

A new window will appear, where you can either delete the variable or modify its initial value.

⚠️ Remember, you can't delete a variable that's being used in a calculation. You'll need to remove the calculations from the fields first.

Also, note that, their edition is subject to that of the template/parallel. That is, if the edition is restricted or you do not have editing permissions in the template (only reader) they cannot be edited.

4. How can I see the value of a variable?

To view or display a variable's value in your template, you can:

  • Copy the simple reference: {{ variable }}

Additionally, you can use the formulas we provide, which you can copy from the menu available next to the variable:

Available formulas:

  • Current value: {{ variable.before }} – Displays the value of the variable up to the point where it is placed, taking into account only the calculations applied before that field. If the field where you copy the variable has calculations, it will also take them into account.

  1. Final value: {{variable}} – Displays the final result of the variable, including all calculations in the template based on the provided answers.

5. Variables in parallels

When you create a parallel from a template that includes variables:

  • From the REVIEW tab you can view the final value of each variable under the signature box.

The value shown in the Review tab always reflects the final result of the variable with all calculations applied.

Viewing calculations in variables

By clicking on the calculation icon, you can check which template operations have influenced the value of your variable. This is particularly useful for risk variables, as it allows you to easily identify which risk factor triggered the calculation of the variable.

Hidding variables in the Review tab

If your parallel includes a long list of variables, you may want to hide some of them from the Review tab.

From the Edit tab of the template, you can turn off the option “Show in the review section” for any variable you don’t want to display:

This is especially useful for variables that are only used for internal calculations and don’t need to be reviewed before closing the parallel.

Did this answer your question?