> 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-two-fields-with-tolerance.md).

# 使用容差比较两个字段

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

## **用途：**

此工作流卡片旨在通过比较两个指定文档字段的值来自动执行操作，并支持应用容差值。借助此功能，系统在比较字段值时可以考虑误差范围（容差），从而在工作流中实现更灵活的决策。

## **卡片组件：**

1. **字段名称 (1)**
   * \*\*说明：\*\*指定要比较的第一个文档字段。
   * \*\*详情：\*\*此名称必须与文档中第一个字段的准确标识符一致。
2. **运算符**
   * \*\*说明：\*\*定义两个字段之间要执行的比较类型。
   * **选项：**
     * \*\*等于 (=)：\*\*检查两个字段的值是否相等。
     * \*\*不等于 (≠)：\*\*确保两个字段的值不同。
     * \*\*大于 (>)：\*\*确认第一个字段的值是否大于第二个字段的值。
     * \*\*大于或等于 (≥)：\*\*验证第一个字段的值是否等于或大于第二个字段的值。
     * \*\*小于 (<)：\*\*检查第一个字段的值是否小于第二个字段的值。
     * \*\*小于或等于 (≤)：\*\*确保第一个字段的值小于或等于第二个字段的值。
3. **字段名称 (2)**
   * \*\*说明：\*\*指定要与第一个字段比较的第二个文档字段。
   * \*\*详情：\*\*此名称应与文档中第二个字段的准确标识符一致。
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-two-fields-with-tolerance.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.
