Skip to main content

How to save the summary value of a sub list field to a separate variable

Bind a sub-list summary to a separate approval-form variable, distinguish it from display, and verify the value used by later steps.

In the Yeeflow approval form designer, you can summarize the values of a sub-list field, for example by adding them or calculating an average. A displayed summary appears at the bottom of the field in the sub-list.

Learn more about how to use the sub list control, please refer: Sub List (Approval form only).

Displaying a summary in the sub-list is different from binding its result to a separate variable. To reuse the total in another form calculation, an approval condition, or a data-list write, bind the summary to a main-form variable.

For such cases, create a variable of a type that matches the summary result. You can add a field control with an associated variable, or use the Variables button at the top-right of the form designer.

Sample: add a Number control named PO Total Amount. In this example, its associated variable ID is POTotalAmount.

Select the sub-list control, find Summary settings in its properties panel, and click Settings.

Click Edit for the summary field; in this example, it is Subtotal Amount.

In the Summary Editor, check that Field is Subtotal Amount and Type is Sum. Under Binding, select PO Total Amount, the main-form field associated with the receiving variable. The Display setting controls whether the summary is shown in the sub-list; it is separate from Binding.

The PO Total Amount receiving field selected in Binding in the original English Summary Editor screenshot; the variable ID is not shown in this crop.

This crop shows the selected receiving field in the original Binding setting, not a variable-ID editor. Its capture date and product build are unknown.

Click OK to save the summary configuration, then save the form. The binding connects the Subtotal Amount summary to the variable associated with PO Total Amount.

You can then use POTotalAmount for other calculations or workflow conditions, or map it to an amount field in a data-list write.

Before using the variable in a workflow, test the form with known line amounts and compare the bound value with the intended summary. Change and remove a line, then check the result again. Use a saved test request to confirm that the following workflow step reads the expected value.

Did this answer your question?