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

# SUBSET

> SUBSET函数用于判断集合B是否为集合A的子集，支持在宜搭的不同场景中使用，如表单、流程设计等。该函数接受两个数组作为参数，并返回布尔值表示结果。

**SUBSET**函数用于计算集合B是不是集合A的子集。

## 支持产品场景

SUBSET函数支持在宜搭的以下场景中使用。

* 表单（业务关联规则）
* 表单（校验）
* 流程设计（校验规则）
* 流程设计（关联操作）
* 集成自动化
* 流程-节点
* 连接器

## 格式

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

## 属性说明

<table>
  <tr>
    <td>**属性**</td>
    <td>**是否必填**</td>
    <td>**说明**</td>
  </tr>

  <tr>
    <td>arrayA</td>
    <td>是</td>
    <td rowSpan={2}>需要进行计算的集合，<br />**说明**：仅支持**成员**和**多选**组件。不支持在子表单中使用。</td>
  </tr>

  <tr>
    <td>arrayB</td>
    <td>是</td>
  </tr>
</table>

## 返回值

| **返回值类型** | **说明**                                                                         |
| --------- | ------------------------------------------------------------------------------ |
| 布尔类型      | 集合B是否为集合A的子集，取值：<br />• **true**：表示集合B是集合A的子集。<br />• **false**：表示集合B不是集合A的子集。 |

## 使用示例

如下图所示，当成员B是成员A的子集时，阻断表单提交。

<Frame>
  ![](https://yida-support.oss-cn-shanghai.aliyuncs.com/static/gif/1704365593721-202f1c7a-159e-4ff6-9671-3644ae042795.gif)
</Frame>

## 体验

当复选框2时复选框1的子集时，阻断表单提交。
