> 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.md).

# 比较两个字段

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

## **用途：**

此工作流卡片旨在通过比较两个指定文档字段的值来自动执行操作。它支持基于字段数据动态决策，并确保工作流根据不同文档值之间的比较结果执行。

## **卡片组件：**

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

## **功能：**

**条件评估：** 系统会评估这两个指定字段中的值是否满足运算符定义的比较条件。

**执行操作：**

* **条件为真：**\
  如果两个字段的值符合比较条件，系统就会触发相关操作。这些操作可以包括更新记录或触发警报。
* **条件为假：**\
  如果两个字段的值不符合指定条件，则可能执行其他操作，也可能不执行任何操作，具体取决于工作流的配置。

## **设置与配置：**

* 用户可从系统提供的可用字段列表中选择要比较的两个字段，以配置此卡片。运算符则从可用比较选项的下拉列表中选择。

## **结论：**

“比较两个字段”工作流卡片是比较文档字段间数据的重要工具。通过根据字段比较结果自动执行操作，此卡片有助于优化决策、支持数据验证并提升工作流自动化水平。


---

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