Column totals (QBOL) |
Top Previous Next |
This example demonstrates:
This example provided in this topic shows how to total the quantity (Qty) column on a QuickBooks Online invoice or other form. Totaling columns is a common need and may be the most common use for text-triggered formulas—formulas triggered by the appearance of specific text in the target application (QuickBooks Online in this case). Totaling a column mostly involves placing a Products and Services item on the last line of the invoice or other form, and entering that item's name in the macro worksheet as the text which will trigger calculation of the column total.
Getting Ready Set up a Products and Services item Instead of using existing Products and Services items to trigger a FullSpeed calculation, usually you will set up a new item for that purpose. This assures the item won't record income unless you want it to (if the Price/Rate is set to 0) and it lets the item provide any descriptive information you may want. Here's a new item, TotalQty, added to use in totaling the quantity column: Notes:
Use the Item on a form Select the TotalQty item on the last line of a form—assuming you want to total all the lines above it. Enter a formula for totaling the Qty column Enter the formula on a text-triggered formula row. In which column? The Qty column is the third column on the form (see the screenshot above), so put the formula in at least the third column of the macro worksheet. You need to leave room to access the form's first column—the Products/Services column—because it contains the trigger item, TotalQty.
Notice that this formula actually sums the Sandbox rows of the Qty column. That is a shorthand way of telling FullSpeed to sum the entire Qty column when the macro actually runs.
Enter the formula's trigger text Enter the trigger text on the same worksheet row as the formula. That way, when FullSpeed encounters the trigger text in Xero it will calculate the formula. Choose macro options Choose appropriate options for running the macro:
Running the Macro
Why the first cell? Because FullSpeed macros process a form downward from where the macro is invoked (run). To total the entire Qty column we must begin at the top. Why the Qty column? That's what we selected as the Begin field on the macro worksheet.
FullSpeed will traverse the form, gathering data. When it reaches the TotalQty row it will write the total in the Qty field. |