All Collections
Using Parallel
Generation of documents and texts
Dynamic texts: Fields with multiple replies
Dynamic texts: Fields with multiple replies

Learn how to retrieve values from a multiple replies field.

Derek avatar
Written by Derek
Updated over a week ago

Remember when you had your contract templates in word with "gaps" to fill in and you would copy and paste the information where it belonged? With Parallel, you no longer need to copy and paste the information, you can leave that job to the references.

In this article, we will explain how to reference fields that allow more than one reply. We will see how we can display them together, generate lists, etc. You only have to insert the reference where you need, and it will automatically be completed with each of the answers to the corresponding field.

💡 If you want to know more about what references are and how to create them, you will find more information in the following link.

Formulas for fields with more than one answer

Any type of field can allow more than one reply, you will find this option in the Field Settings.

If we look at the Contents tab of the petition we will see that the fields with references have two buttons:

  • One to copy the simple reference

  • And another of More options, where we will find the formulas of that field.

💡 If you don't find those buttons or want to know more about simple references we recommend you to read this article first.

Each field will contain formulas depending on the type of field it is (Short answers, Options, Numbers, etc.).

Now let's look at the formulas common to all fields that allow more than one answer:

  1. List of replies: Creates a list of bullets with each of the answers received by our field.

  2. One-line replies: Shows all the replies in one line (e.g. answer, answer and answer).

List of replies

Let's look an example:

I want the description of the phone numbers to list the names of the people in the team. To do this, I will go to the name field, copy the formula "List of replies" and paste it into the description of phone numbers.

A text like this will be pasted:

{% for respuesta in name -%}
- {{ respuesta }}
{% endfor %}

Now let's go to the Preview tab to see what it looks like!

You will see that the field description will list the answers added to the field (to which you have assigned that reference).

One-line replies

Following the same example, let's see how by pasting the "One-line replies" formula, the answers with the names in the same sentence come out.

This time a text similar to this one will be pasted:

{% for reply in name -%}
{% if forloop.first == true %}{% elsif forloop.last == true %} and {% else %}, {% endif %}{{ reply }}
{%- endfor %}

Let's go to the Preview screen to see how it looks like!

Now, the field description will show the answers added to the field in a single sentence.

Other formulas

Now that you have learned how to generate dynamic texts with multiple response fields, you can continue learning with the following guides:

  • Basic formulas with text responses: Choose if you want your references to be copied and pasted with uppercase, lowercase, etc...

  • Formulas for questions with conditions: Learn how to copy and paste references that change depending on external variables.

  • Formulas for numerical fields: You can copy and paste numbers in different formats and choose formulas to make calculations with them.

Did this answer your question?