Table totals component is an ouptut field element which is connected to table elemet on form. It can count selected rows or sumarise values from selected rows using configured collumn. The element generates an HTML output field with a side button to activate the scanner (camera).
Once the code is read, it’s value will be placed in the input field.
Table-totals example
Use table-totals element type to place onle total output field on your form.
The table-totals has the following properties:
NOTE: If operation is set to “sum”, then fieldId is mandatory to provide. To correctly sumarize field the value inside it must be numeric.
Examples:
Example of table-totals field which will display number of selected rows. Note, the table id is “items”
{ "id": "countRows", "type": "table-totals", "label": "Count selected rows", "tableId": "items", "operation":"count"}
Example of table-totals field which will display sumarized value of selected rows from column orderValue. Note, the table id is “items”
{ "id": "sumColumn", "type": "table-totals", "label": "Sum order value", "tableId": "items", "operation":"sum", "fieldId": "orderValue"}