ProTip: Add Instant Calculations to Your Table Fields
Level-up your Table fields with instant Calculations
Table fields allow mobile form users to enter their data into structured, organized line items. Each Table field column can be customized to host a unique field type, for example, Drop Down menus, Images, Barcodes, Text fields, Number fields, and more.
When adding numerical data to your Table fields (e.g. prices, quantities, overtime hours, etc.) Calculations offer a simple means of streamlining math and improving the accuracy of the entered data. These Calculations can be leveraged by the end-user to instantly total work hours, invoice totals, include taxes and discounts, and so much more.
For example, if an employee were filling out a Timesheet, a Calculation could be used to instantly total the work hours entered within Table cells. This Calculation could also factor in overtime hours worked, any projected deductions, and taxes, presenting the employee with the amount they can anticipate within their next paycheck. Similarly, Calculations can be used to total Table cells and produce invoice amounts, inventory quantities, and so much more.
Calculations can be easily added to Table field cells. Table cells are defined as [column#][row#], giving precise instruction as to which cells should be referenced to perform the calculation. For instance, a Table field named ‘Tools’ might include the following columns:
Column 1: Price
Column 2: Quantity
Column 3: Total
To calculate the total cost of a line item could be instantly calculated using the following syntax: =[Tools]![1][1] * [Tools]![2][1]. This syntax can be added to the Default Value of the first cell in the ‘Total’ column, instructing your mobile form to multiply the number in the first cell of the first column (‘Price’) with the first cell of the second column (‘Quantity’). To calculate the next row (row 2) of the ‘Total’ column, you would adjust the syntax to be: =[Tools]![1][2] * [Tools]![2][2].
Adding Calculations to your Table’s Default Value property
Locating and editing your Table’s Default Value properties by navigating to the Properties panel and following the instructions below:
Click the Columns property, and select the [...] button.
The Columns window will appear. Click on the column you would like to display the Calculation total and scroll to the bottom of its properties.
Locate the Default Value for your desired Column row. Paste the appropriate Calculation string within each row. Be sure to adjust the column and row numbers to reference the next row of cells you wish to reference in your Calculation.
Click Done (and be sure to save your Template changes!).
To learn more about optimizing your Table fields to streamline data entry and improve accuracy, check out our video guide to Adding and Optimizing Your Table Fields.