> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Form Formulas

> This article explains how to use YiDA form formulas to improve form-filling efficiency, reduce errors, and enable business logic calculations and workflow automation. It covers use cases, step-by-step instructions, and key considerations.

YiDA provides a formula editor on form components where you can select functions and fields to build calculation expressions without writing code.

## Use Cases

* When filling in or editing form data, component values can be calculated automatically based on formulas instead of being entered manually, which improves efficiency and reduces errors.
* When a user submits form data, formulas can define validation rules. If the input does not meet the rules, submission is blocked and an error message is displayed.
* After form data is submitted, formulas can apply business rules to add, update, or delete data in other forms.

## Use a Formula

Follow the steps below to use a YiDA formula.

1. Open the formula editor dialog in YiDA.

For example, the following figure shows how to set a formula on a component.

2. In the formula editor dialog, click **Function list** and select the function you need.

For example, select the text concatenation function **CONCATENATE**.

3. On the left, select the form fields you want to use.

For example, this article concatenates **Single-line text 1** and **Single-line text 2**.

4. After configuring the function, click **Confirm** in the lower-right corner to complete the setup.

## Notes on Using Formulas

* Selecting fields from current or all form fields

In most cases, the fields used in a formula are selected from **Current Form Fields**.

Only functions for business association rules use **All Form Fields**.

Note: fields selected from the current form are shown in blue, while fields selected from all form fields are shown in green.

* Operators

Formulas support the basic arithmetic operators +, -, \*, and /.

| Add | Subtract | Multiply | Divide |
| --- | -------- | -------- | ------ |
| +   | -        | \*       | /      |

* Use uppercase for functions.

Enter function names in all uppercase letters. Auto-suggestions appear as you type, and valid function names are displayed in purple.

* Fields selected from the current form are shown in **blue**, and fields selected from all form fields are shown in **green** (only business association rules use all form fields).
* Enter function names in all uppercase letters.
* All commas, parentheses, and other symbols in a formula must be in half-width (English) form.
* Hidden fields participate in calculations only when **Always submit** is turned on.

## FAQ

**Q: Why can't I manually edit a value after setting a formula on the component?**

If a component uses a formula to set its default value—for example, the formula `user()` is configured and the component state is normal—but the value cannot be edited when submitting the form, check whether the component is referenced by a formula on another component. Manual editing is not supported if the component is referenced by another component's formula.

**Q: Save failed: the form contains a circular formula dependency.**

If the error message shown below appears, it means the formula configuration references the same component being edited.

Example: Suppose the form contains Numerical 1 and Numerical 2 components. If the formula configured on Numerical 2 references Numerical 2 itself, the system reports a circular dependency error.

**Q: Data is being processed. Please try again later.**

When a form is submitted or saved, the system automatically checks for formula calculations that are still running. If any formula calculation is in progress, the system prompts: Data is being processed. Please try again later.

**Continue anyway: Continuing may result in inconsistent data. Please wait for data processing to complete.**
