Our form designer allows you to link choices fields to a data source that you have previously uploaded. Data sources can have as many columns as you like. You may want to refer to the values in these columns when creating a form. To do so, you will need to use a formula to refer to the desired column.

By default the first column in a data source (also known as the value column) is used as a field's answer. If you want to refer to any other column's value, you need to use an index syntax - specifically you need to add square brackets around the column's index number - e.g. #{{product[index]}}.

Data source column indexes always start at zero. The first column has index of 0, the second column has index 1, third column is index 2, and so on.

Example:

You have a data source called 'Products' that contains your product list, with rows such as:


You create a form named 'Sales Order' which you will use to capture orders for your products. The form has the following fields:

  • product_choice : A choices field that is linked to the products data source.
  • quantity : A number field that captures the quantity of product ordered.
  • total : A number field that will calculate the total amount by multiplying the product's price by quantity.

On the 'total' field, you would define a dynamic value formula as follows: #{{product_choice[2]}} * #{{quantity}}.

Note: The square brackets and index value of 2 used to refer to the 3rd column (the price) in the products data source.

Did this answer your question?