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

# UNIONSET

> The UNIONSET function returns the union of two sets. It is supported across various YiDA scenarios, including forms and workflow design. This function takes two arrays as parameters and returns a list of user IDs.

The **UNIONSET** function returns the union of two sets.

## Supported Product Scenarios

The UNIONSET function is supported in the following YiDA scenarios:

* Form (business association rules)
* Form (validation)
* Workflow design (validation rules)
* Workflow design (association actions)
* Integration and automation
* Workflow node
* Connector

## Format

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
UNIONSET(arrayA,arrayB)
```

## Attribute Description

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

  <tr>
    <td>arrayA</td>
    <td>Yes</td>
    <td rowSpan={2}>The sets whose union you want to calculate. Separate multiple sets with commas.<br />**Note**: Only unions of member components are supported. Subforms are not supported.</td>
  </tr>

  <tr>
    <td>arrayB</td>
    <td>Yes</td>
  </tr>
</table>

## Return Value

| **Return type** | **Description**       |
| --------------- | --------------------- |
| array           | The list of user IDs. |

## Example

The following example uses the `UNIONSET()` and `EMPLOYEE()` functions to calculate the union of two member components.
