TABLE Block

SKIP AHEAD TO 
Why would you use a TABLE block?
How to configure your TABLE block
How to create a dynamic table
How to create automated calculations in TABLE blocks
Limitations of Tables & Workarounds

 

Why would you use a TABLE block?

The TABLE block creates a page in the Assessment that displays a table where end users can enter their inputs into and perform automated calculations.

TABLE blocks can typically be used for (but not limited to):

  • Expense calculations

    Data_Capture_Section_V2_2020-10-22_12-00-10.png


  • Collecting personal information (name, age, gender, DOB etc)

    Data_Capture_Section_V2_2020-10-22_12-00-39.png

 

How to configure your TABLE block 

  1. Click on your Table block then click "Open Table Builder"

  2. Add or delete rows and columns by either:

    a) Click and drag the bottom right-hand corner of the Table; or
    b) Right click on the numerical row labels or alphabetical column labels

  3. Add and define a header row by clicking on row label '1' and toggling “Header Row”

  4. Define cell input types by clicking onto a cell and select a cell type.

    Cell types available:

    Cell Type Description
    Text A cell that displays text
    Text Input Cell area which allows end users to input text
    Number Input Cell area which allows end users to input a number
    Radio Asks your user to select from multiple options
    Checkbox Gives the option for your user to check/uncheck the checkbox
    Dropdown Asks your user to select from a dropdown list
  5. (Optional) When you don’t know how many inputs the end user has, you can allow your end user to add rows manually by

    Notes:  
  • Please ensure each of the cells allow for the appropriate input e.g. Text Input/Number Input.
  • The row in which your end user can add rows will be highlighted orange in the Table Builder
  • End users are able to skip over TABLE pages without entering information – there is no required toggle



How to create a dynamic table

Tables can dynamically generate rows to match the number of entries in a prior LIST variable (i.e. 3 LIST entries will generate 3 rows in the table).

Follow the instructions below to set this up

  1. In your App Studio, drag in and add a LIST block to your App. Learn more.
  2. Click “Show Logic” on the top toolbar and identify the LIST variable you want to match the rows of your Table to.

    Data_Capture_Section_V2_2020-10-22_12-01-28.png

  3. Inside a TABLE block, set up the header row then reference the LIST variable using double curly braces (e.g. {{LIST23}}) in the relevant column or row.  In this case, the LIST block captured the name of dependents and therefore will be referenced under the “Name of dependent” column in cell A2.

    Note: Dynamic rows will be recognised through the row that is highlighted in green

    Data_Capture_Section_V2_2020-10-22_12-02-15.png


  4. Define cell input types by clicking onto a cell and select a cell type.

    Data_Capture_Section_V2_2020-10-22_12-03-02.png


How to create automated calculations in TABLE blocks

You can customise TABLE blocks to perform automated calculations by using similar syntax in excel spreadsheets. The components of the calculations can include the numerical inputs of end users for dynamic calculations as the end user enters numerical values in the cells of the table.

Available Calculations
Your spreadsheet can auto-calculate using:

Calculation              Operator Example
Sum sum =sum(A2)
OR
=sum(A2, A3, A4)
Subtract - =A1-A2
Multiply * =A1*A2
Divide =A1/A2
Parenthesis () =(A1-A2)*A3
If IF(Condition, True, False) =IF(A1>A2, "Yes", "No")


To run a calculation in a cell:

  1. Set the input type to Text
  2. Begin your entry with “=”
  3. After the =, pair cell names (e.g. A1, B2) and calculation operators from the above table

Your entry may look like this in the Table Builder:

Data_Capture_Section_V2_2020-10-22_12-03-34.png

And appear to your end user like this:

Data_Capture_Section_V2_2020-10-22_12-04-15.png


Once your end user enters numbers into cells referenced in your calculation line, the auto-calculations will run and be displayed:

Data_Capture_Section_V2_2020-10-22_12-04-52.png

Note: When multiplying using negative numbers, add a space between the multiplication and negative number operators, i.e. =A2 * -100, not A2*-100.

 

Limitations of Tables & Workarounds

As it stands, each Table can only hold upto 14 rows and 14  columns of data. To work around this, you can:

  • If there are less than 7 data headings, you can duplicate the headings in the same table to ensure that all the data is captured. In the below screenshot, “Number”, “Name” and “Cat Person or Dog Person” data headings are duplicated since there are more than 14 rows required.

    dogcat.png

  • Use two or more tables to store all of your data, use a MERGE block to convert all the inputs into a list and reference this list to create a dynamic table as shown in the above “How to create a dynamic table”
  • If the table will be modified by the end user, enable the "User can add rows" functionality which will enable them to add as many rows as they'd like.