Adding up a table in a form

A Table question collects repeating rows, such as the lines of an expenses claim or the products a supplier offers. A number column can show a total under the table.

What you need

A form open in the builder. See Building and publishing a form.

Build the table

  1. Choose Add a question and pick Table.
  2. Set the Question label.
  3. Add the columns. Each has a label, a type, a key and the options its type has.
  4. On a number column, switch on Show total to total it under the table.
  5. To work a column out per row, set Computed value (optional) on it. It is read-only and uses other columns by key, for example row.miles * row.rate.
  6. Set Minimum rows and Maximum rows if you need them. 0 for the maximum is no limit.
  7. Change Add-row button label if you want something other than Add a row.

Table question settings with columns, totals and a computed column

Choose Preview, add a row and watch the computed column and the total update.

Lookups in a table

A column of type lookup looks up a value per row, from an automation your administrator has approved. Capture the whole object so a computed column can use its properties, for example row.item.price * row.qty. See Approving an automation for forms.

Use the total elsewhere

Other rules can read the table’s answers. For example, answers.total > 0 as Enable the submit button when… in Settings > Behaviour > Submit button.

Put the rows in a document

A Word or OpenDocument template can print one row for each table entry. A document holds at most 200 table rows. A response with more is refused and no document is made. See Filling a Word or PDF template from a form.

If something does not work

  • A response with a large table is refused by a template. The 200-row limit applies only to document templates.

Full reference

← All articles