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

# DIFFERENCESET

> The DIFFERENCESET function returns the difference set of two collections. It is supported in YiDA scenarios such as Form, workflow design, and integration & automation. The function takes two parameters, arrayA and arrayB, and returns a list of member user IDs.

The **DIFFERENCESET** function returns the difference set of two collections.

## Supported Product Scenarios

The DIFFERENCESET function is supported in the following YiDA scenarios.

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

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
DIFFERENCESET(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 collections for which to calculate the difference set. Separate multiple collections with commas.<br />**Note**: Only difference sets of member components are supported. This function cannot be used in a subform.</td>
  </tr>

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

## Return Value

| **Return value type** | **Description**            |
| --------------------- | -------------------------- |
| array                 | A list of member user IDs. |

## Example

Use the `DIFFERENCESET()` and `EMPLOYEE()` functions to calculate the difference set of two member components.
