# If

This node is used to test a condition, if the condition is true then the statement of the if block will be executed, otherwise it will be ignored.\
\
Nút này dùng để kiểm tra một điều kiện, nếu điều kiện đúng thì câu lệnh của khối if sẽ được thực thi và chạy ra đường màu xanh, nếu sai nó sẽ chạy qua đường màu đỏ.

<figure><img src="/files/91QgbAodJih4Ey57PkHo" alt=""><figcaption></figcaption></figure>

|                   |                                             |
| ----------------- | ------------------------------------------- |
| Variable          | Chọn biến để so sánh                        |
| Operator          | Chọn toán tử để so sánh                     |
| Variable or value | Chọn biến hoặc nhập nhập giá trị để so sánh |

Các toán tử so sánh bao gồm:&#x20;

* **<** : So sánh bé hơn. Nếu điều kiện đúng thì sẽ ra đường màu xanh, nếu điều kiện sai sẽ ra đường màu đỏ. Tương tự với **>** ; **<=** ; **>=**.
* **=** : So sánh bằng. Nếu 2 giá trị so sánh của bạn bằng nhau thì sẽ chạy ra đường màu xanh, còn không bằng nhau sẽ ra đường màu đỏ.
* **!=** : So sánh không bằng. Nếu 2 giá trị so sánh của bạn khác nhau (không bằng nhau) thì sẽ chạy ra đường màu xanh, còn nếu bằng nhau sẽ ra đường màu đỏ.
* **Starts with** : Nếu biến bạn chọn bắt đầu bằng giá trị mà bạn nhập vào trường **Variable or value**, thì sẽ ra đường màu xanh, còn nếu không sẽ ra đường màu đỏ. Ví dụ biến **a** có giá trị  *"***hello! this is Hidemium***"* , tại trường variable or value bạn nhập **hello** thì kết quả sẽ đi ra đường màu xanh.
* **Ends with** : Nếu biến bạn chọn kết thúc bằng giá trị mà bạn nhập vào trường **Variable or value**, thì sẽ ra đường màu xanh, còn nếu không sẽ ra đường màu đỏ. Ví dụ biến **a** có giá trị  "**hello! this is Hidemium**" , tại trường variable or value bạn nhập **Hidemium** thì kết quả sẽ đi ra đường màu xanh.
* **Contains** : Nếu biến bạn chọn bao gồm giá trị mà bạn nhập vào trường **Variable or value**, thì sẽ ra đường màu xanh, còn nếu không sẽ ra đường màu đỏ. Ví dụ biến **a** có giá trị  "**hello! this is Hidemium**" , tại trường variable or value bạn nhập **this** thì kết quả sẽ đi ra đường màu xanh.

{% file src="/files/NfArVxYoDGDUzreHxuMR" %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hidemium.io/automation-user-manual/other/if.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
