> ## 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.

# NUMBERCOMPARE

> The NUMBERCOMPARE function compares two numbers. It is supported across various YiDA scenarios such as forms and workflow design. The function takes two required parameters, num1 and num2, and returns a boolean value indicating the comparison result.

The **NUMBERCOMPARE** function compares two numbers.

## Supported Product Scenarios

The NUMBERCOMPARE function is supported in the following YiDA scenarios:

* Form (main table field)
* Form (business association rule)
* Form (validation)
* Workflow design (validation rule)
* Integration and automation
* Workflow node
* Connector

## Format

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
NUMBERCOMPARE(num1,num2)
```

## Attribute Description

<table>
  <tr>
    <td>**Attribute**</td>
    <td>**Required**</td>
    <td>**Description**</td>
  </tr>

  <tr>
    <td>num1</td>
    <td>Yes</td>
    <td rowSpan={2}>The numerical value to compare.</td>
  </tr>

  <tr>
    <td>num2</td>
    <td>Yes</td>
  </tr>
</table>

## Return Value

| **Return value type** | **Description**                                                                                                                                              |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Boolean               | The comparison result.<br />• **true**: returned when `num1` is greater than `num2`.<br />• **false**: returned when `num1` is less than or equal to `num2`. |

## Example

As shown below, use the `NUMBERCOMPARE()` function to compare the values of two numerical components.

## Try It Out

Compare the values of two numerical components. If **Numerical component 1** is greater than **Numerical component 2**, the function returns **true**; otherwise, it returns **false**.
