> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/and/document-field/compare-field-with-tolerances.md).

# 比较字段并设置容差

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-713fb5acf55fa910748f41eca7fe0e31ea879e6b%2Fimage%20(57).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## **用途：**

此工作流卡片用于将字段值与指定的参考值进行比较，并允许设置容差。它支持在工作流中进行精确的条件处理，同时允许小幅偏差，因此适用于质量保证、财务分析或基于阈值执行操作等场景。

## **卡片组件：**

1. **字段名称**
   * **描述：** 要进行比较的字段。
   * **详情：** 该名称必须与文档中第一个字段的标识符完全一致。
2. **比较运算符**
   * **描述：** 指定如何将所选字段值与参考值进行比较。
   * **选项：**
     * **等于 (=)：** 验证字段值是否与参考值完全匹配。
     * **不等于 (≠)：** 验证字段值是否与参考值不同。
     * **大于 (>)：** 检查字段值是否大于参考值。
     * **大于或等于 (≥)：** 检查字段值是否大于或等于参考值。
     * **小于 (<)：** 检查字段值是否小于参考值。
     * **小于或等于 (≤)：** 检查字段值是否小于或等于参考值。
3. **参考值**
   * **描述：** 用于与字段进行比较的值。
   * **详情：** 根据比较场景，该值可以是数字、文本或日期。
4. **容差值**
   * **描述：** 定义比较时可接受的误差范围。
   * **详情：** 容差值是一个数值，表示在比较结果为真时，两个字段值之间允许的最大差值。
5. **容差类型**
   * **描述：** 指定容差值的计量单位。
   * **选项：**
     * **数值：** 容差为绝对值，表示两个字段的差异可以在指定容差值以内。
     * **百分比：** 容差按第二个字段值的百分比计算，从而允许相对误差范围。

## **功能：**

* **条件评估：** 系统使用所选比较运算符，将字段值与参考值进行比较。如果设置了容差，当字段值处于定义的容差范围内时，系统会将比较判定为成功。
* **执行操作：**
  * **在容差范围内：** 如果字段值在指定容差范围内满足条件，工作流将继续并触发相关操作。
  * **超出容差范围：** 如果字段值不满足条件或超出容差范围，系统可能会执行其他操作，例如记录日志、发送警报或停止工作流。

## **设置和配置：**

* 用户从可用字段列表中选择要评估的字段，并从下拉列表中选择比较运算符（例如，等于、大于），以此配置该卡片。随后，用户指定要比较的参考值并定义容差值，然后选择容差类型（例如，百分比或数值）。

## **结论：**

“字段容差比较”卡片是一种灵活的工具，适用于需要灵活评估的工作流。通过支持带容差的比较，它能让工作流保持高效且适应性强，在不影响准确性的前提下兼顾现实场景中的差异。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/and/document-field/compare-field-with-tolerances.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
