Grand Totals

If you have a sub-form with a total or number field, and want to have a grand total in the main form, you will need to use a special formula to calculate this.

In the formula expression, put something like this:

GrandTotal(&path/Items/SubTotal, #input)

Replace "Items" with the name of your subform, and SubTotal with the name of the field that contains the number you want to add to your grand total.

The GrandTotal function is a special function that will calculate both in the form (while you're editing it) and outside of the form if you happen to add entries to the Items list manually or from other scripts.

Keep in mind that you may have to add the flag "Triggers Inline Change Event" to the sub-total field, in order to have it trigger the recalculation in the main form.

You can use this function in either a calculation formula on a field, or in a workflow stage by setting the Initialize to Calculation, and then putting the formula into the Default Value option.

Also keep in mind that the sub-total and grand-total fields must be numeric data types (eg. money or floating point).


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM