> ## Documentation Index
> Fetch the complete documentation index at: https://learn.cleeksy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bộ lọc & toán tử (Filters & operators)

> Tra cứu filters và operators để lọc dữ liệu đúng.

Trang này là bảng tra cứu nhanh về **filters (bộ lọc)** và **operators (toán tử)**. Mục tiêu là giúp lọc dữ liệu chính xác theo kiểu field.

> Gợi ý: khi lọc nâng cao, luôn xác định rõ **field type** trước (text/number/date/status/people…) để chọn operator phù hợp.

***

## Operators thường gặp (khái quát)

| Nhóm       | Operators phổ biến          | Dùng khi                    |
| ---------- | --------------------------- | --------------------------- |
| So khớp    | `equals` , `not equals`     | so khớp giá trị chính xác   |
| Chứa       | `contains` , `not contains` | tìm theo từ khoá trong text |
| Rỗng       | `is empty` , `is not empty` | kiểm tra thiếu dữ liệu      |
| Tập hợp    | `in` , `not in`             | lọc theo danh sách giá trị  |
| So sánh    | `>` , `≥` , `<` , `≤`       | số lượng, chi phí, điểm     |
| Khoảng     | between                     | date/number trong khoảng    |
| Thời gian  | `before` , `after` , `on`   | lọc theo mốc thời gian      |
| Người dùng | is, is not, is me           | phân công theo user         |

***

## Theo từng field type

### Text / Long text

* contains / not contains
* equals / not equals (khi có chuẩn hoá)
* is empty / is not empty

**Ví dụ**

* “Title contains ‘urgent’”
* “Reason is empty”

### Number / Currency / Percent

* `=` , `≠` , `>` , `≥` , `<` , `≤`
* between
* is empty / is not empty

**Ví dụ**

* “Estimated cost > 10,000,000”
* “Qty between 1 and 5”

### Date / Datetime

* before / after / on
* between
* is empty / is not empty

**Ví dụ**

* “Due date before today”
* “Scheduled at between 2026-02-01 and 2026-02-28”

### Single select / Multi select / Status

* equals / not equals
* in / not in
* contains (áp dụng cho multi select theo giá trị)

**Ví dụ**

* `Status in (New, In progress)`
* `Tags contains 'Vendor A'`

### User/People

* is / is not
* is me / is not me
* is empty / is not empty

**Ví dụ**

* “Assignee is me”
* “Approver is empty”

### Attachment

* is empty / is not empty
* (tuỳ UI) has attachments / no attachments

**Ví dụ**

* “Receipt is not empty”

### Data Connection / Lookup / Rollup

* is empty / is not empty
* equals / not equals (với các trường có giá trị xác định)
* `>` , `<` (với rollup dạng số)

**Ví dụ**

* “Vendor link is empty”
* “Total item cost rollup > 5,000,000”

***

## Logic kết hợp (AND/OR)

* **AND**: tất cả điều kiện cùng đúng
* **OR**: chỉ cần một điều kiện đúng

**Pattern phổ biến**

* (Status = Needs info) AND (Due date before today)
* (Assignee is me) OR (Watcher contains me)

***

## Debug lọc “không ra kết quả”

Checklist nhanh:

* Field type có đúng không?
* Giá trị lọc có đúng format (đặc biệt date/datetime)?
* Có filter ẩn khác đang áp dụng không?
* Người dùng có quyền xem record đó không?

Liên quan: [Mô hình phân quyền (Permissions model)](/reference/permissions-model-public)
