Skip to main content

Calculation

Use a Yeeflow Calculation control to make a formula, display its result, and reuse that result in an approval workflow.

Use Calculation to show a read-only result based on other values. For example, add two expenses to show a total. The Expression Editor lets you combine available fields or variables with operators and built-in functions supported by that setting. Understand the Expression Editor


Add Calculation to the form

In the approval form designer, open Controls → Basic Fields and drag Calculation into a section or container. If the result depends on user input, add the input controls as well. Approval form designer


Basic of the Calculation field

  1. In Content → Basic, set the Title, such as Total Expense.

  2. Check the Associated Variable. Yeeflow creates one when you add the control to an approval form. Use Edit to update its ID and name, or Reset to select a compatible existing variable.

  3. Next to Expression, select Edit. Insert Expense A and Expense B from the variables available in the editor, with a plus sign between them. Preview with 39,450 and 268. The result should be 39,718.

Yeeflow Calculation Basic settings showing the Total Expense title, Expense All workflow variable, and a formula adding Expense A and Expense B.

Check that the returned data type matches its associated variable or field. In list calculations, the expression editor offers a different set of references. Check which fields are available before building the formula. Form controls and their associated fields · Calculate with the Expression Editor

Use the result in a workflow

An approval workflow can read the associated variable. For example, a project approval form can calculate a profit rate with (Contract Price - Estimated Cost) / Contract Price and use 0.2 as the threshold for a 20% decision branch. Require a positive contract price to avoid division by zero.

If you also need a stored result in a data list, map the variable to a compatible field in the workflow’s Set Data List action. Submit a test record, check the branch, and open the saved list item to verify the mapped value. Project cost example · Profit-rate branch · Set Data List Action


Appearance of the Calculation field

Under Content → Appearance, turn on Thousands Separator for a numeric result such as an expense total. Use Prefix or Suffix to add text around the result, such as the reporting currency.

Use Display Title and Allow Comment to control the label and comments. If another control presents the result, use Hide in form and preview the result where it is used.


Validation of the Calculation

Under Content → Validation, use Number of Decimal Places to set rounding precision for a numeric or currency result. If a decision depends on an exact threshold, preview values close to that threshold and compare the displayed result with the value used in the workflow.

Use Custom Validation to add error rules. When the error condition is true, the configured message appears below the field. Test normal values, blank inputs, and invalid inputs that could produce an error. Custom Validation.


Action call of the Calculation field

On the Calculation control, open Content → Action and set Value Changed to a saved form action. The action runs when the calculated value changes. In preview, change an input and check the result and the action’s effect. If the calculation feeds a workflow decision, test it separately when the workflow reaches that decision. Form Actions


Style the Calculation field

Use the Style tab to make the read-only result clear alongside the fields that supply its values.

Field

Set the result’s typography, text color, background, alignment, padding, border, and corner radius. Preview values that include a prefix, suffix, or several digits.

Style of title

Set the label’s typography and position. Check the title and result together at desktop and phone widths. Title of field controls


Advanced Settings

Use Advanced for shared control settings. Preview the result and validation message on the desktop and phone layouts. Advanced Settings Tab


Types of Data

A formula can return text, a number including a percentage, currency, a date and time, or a Yes/No value. Use a compatible data type where you bind the result and where any subsequent formula, condition, or action reads it.
​


​

Did this answer your question?