> For the complete documentation index, see [llms.txt](https://docs.clickai.vn/clickai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickai.vn/clickai-docs/clickai-docs-en/function/database/data-operations.md).

# Data Operations

## Table of Contents

·       \[Search]\(#search)

·       \[Sort]\(#sort)

·       \[Filter]\(#filter)

·       \[Group By]\(#group-by)

·       \[Hide Fields]\(#hide-fields)

·       \[Row Height]\(#row-height)

·       \[Field Summary]\(#field-summary)

&#x20;

## Search

Quickly search for records by field values:

### Global Search

1\.     Click the 🔍 icon on the toolbar or use the keyboard shortcut Ctrl/Cmd + F

2\.     Enter your search keywords

3\.     Results are highlighted directly in the table

### Field-specific Search

4\.     Open Search → select a specific field from the dropdown

5\.     Enter the value to find

6\.     Search is limited to the selected field

💡 TIP: Search helps you find records quickly but only highlights results — it doesn't filter the view. If you want to show only matching records, use \*\*Filter\*\* instead.

&#x20;

## Sort

Sort records by one or more fields:

### Add a Sort

7\.     Click the Sort button on the toolbar

8\.     Select the field to sort by

9\.     Choose the order: Ascending (A→Z, 1→9) or Descending (Z→A, 9→1)

### Multi-level Sort

Sort by multiple criteria — the second sort applies within groups of records with identical first-sort values:

10\.  Click Sort → + Add Sort

11\.  Select the field and order for each level

Multi-level Sort Example:\
──────────────────────\
Sort 1: Status (Ascending)      → Active → Inactive → Pending\
Sort 2: Created Date (Desc)     → Newest first within each Status group

### Remove Sort

·       Click the ✕ icon next to a sort rule

·       Or click Clear All to remove all sorts

📝 NOTE: Sort configurations are saved per view. Sorting in Grid View 1 does not affect Grid View 2.

&#x20;

## Filter

Filter records to display only data matching specific conditions:

### Add a Filter

12\.  Click the Filter button on the toolbar

13\.  Select the field to filter

14\.  Choose the operator

15\.  Enter the filter value

16\.  Records not matching the condition are hidden

### Common Operators

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Operator</td><td valign="top">Description</td><td valign="top">Applies to</td></tr><tr><td valign="top">is equal</td><td valign="top">Exactly matches value</td><td valign="top">Text, Number, Select</td></tr><tr><td valign="top">is not equal</td><td valign="top">Does not match value</td><td valign="top">Text, Number, Select</td></tr><tr><td valign="top">contains</td><td valign="top">Contains substring</td><td valign="top">Text</td></tr><tr><td valign="top">does not contain</td><td valign="top">Does not contain substring</td><td valign="top">Text</td></tr><tr><td valign="top">is empty</td><td valign="top">Cell is empty</td><td valign="top">All</td></tr><tr><td valign="top">is not empty</td><td valign="top">Cell has a value</td><td valign="top">All</td></tr><tr><td valign="top">is greater than</td><td valign="top">Greater than</td><td valign="top">Number, Date</td></tr><tr><td valign="top">is less than</td><td valign="top">Less than</td><td valign="top">Number, Date</td></tr><tr><td valign="top">is within</td><td valign="top">Within range</td><td valign="top">Date</td></tr><tr><td valign="top">is like</td><td valign="top">Pattern matching</td><td valign="top">Text</td></tr></tbody></table>

&#x20;

### Combining Multiple Filters

Use AND / OR logic to combine multiple conditions:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Logic</td><td valign="top">Description</td></tr><tr><td valign="top">AND</td><td valign="top">All conditions must be true</td></tr><tr><td valign="top">OR</td><td valign="top">At least one condition must be true</td></tr></tbody></table>

&#x20;

Combined Filter Example:\
──────────────────────\
Filter 1: Status IS "Active"\
&#x20; AND\
Filter 2: Revenue IS GREATER THAN 1000000\
&#x20; AND\
Filter 3: Region IS "Ho Chi Minh"\
\
→ Result: Shows only Active customers in HCM with revenue > 1M

### Filter Groups (Nested Conditions)

Create nested condition groups for complex logic:

(Status IS "Active" OR Status IS "VIP")\
&#x20; AND\
(Region IS "Ha Noi" OR Region IS "Ho Chi Minh")

&#x20;

## Group By

Group records by field values to display data by category:

### Add a Group

17\.  Click the Group button on the toolbar

18\.  Select the field to group by

19\.  Choose the group order (Ascending/Descending)

### Multi-level Grouping

Create nested groups with multiple levels:

Group Level 1: Department\
├── Engineering\
│   Group Level 2: Position\
│   ├── Senior Developer (3 records)\
│   └── Junior Developer (5 records)\
├── Marketing\
│   ├── Manager (2 records)\
│   └── Specialist (4 records)\
└── Sales\
&#x20;   ├── Lead (1 record)\
&#x20;   └── Representative (6 records)

### Features in Grouped View

·       Collapse/Expand: Collapse or expand each group

·       Count: Display the number of records in each group

·       Summary: Display aggregates (Sum, Avg...) per group

&#x20;

## Hide Fields

Hide unnecessary fields in the current view:

20\.  Click the Fields button on the toolbar

21\.  Toggle each field on/off

22\.  Drag & drop to reorder field display

📝 NOTE: Hiding a field only affects the current view — data still exists and can be accessed via other views or the API.

&#x20;

## Row Height

Adjust row height to show more or less content:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Option</td><td valign="top">Description</td></tr><tr><td valign="top">Short</td><td valign="top">Compact, shows only 1 line of text</td></tr><tr><td valign="top">Medium</td><td valign="top">Moderate, shows 2-3 lines</td></tr><tr><td valign="top">Tall</td><td valign="top">Tall, shows more content</td></tr><tr><td valign="top">Extra</td><td valign="top">Very tall, shows maximum content and attachment previews</td></tr></tbody></table>

&#x20;

&#x20;

## Field Summary

Display aggregate information in the table footer:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Function</td><td valign="top">Description</td><td valign="top">Applies to</td></tr><tr><td valign="top">Count</td><td valign="top">Count records</td><td valign="top">All</td></tr><tr><td valign="top">Count Empty</td><td valign="top">Count empty cells</td><td valign="top">All</td></tr><tr><td valign="top">Count Filled</td><td valign="top">Count filled cells</td><td valign="top">All</td></tr><tr><td valign="top">Count Unique</td><td valign="top">Count unique values</td><td valign="top">All</td></tr><tr><td valign="top">Sum</td><td valign="top">Total sum</td><td valign="top">Number</td></tr><tr><td valign="top">Average</td><td valign="top">Average value</td><td valign="top">Number</td></tr><tr><td valign="top">Min</td><td valign="top">Minimum value</td><td valign="top">Number, Date</td></tr><tr><td valign="top">Max</td><td valign="top">Maximum value</td><td valign="top">Number, Date</td></tr></tbody></table>

&#x20;

How to use:

23\.  Click on the footer cell of the desired field

24\.  Select an aggregation function from the dropdown

25\.  Results are displayed directly in the footer


---

# 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 dynamically by asking a question.

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

```
GET https://docs.clickai.vn/clickai-docs/clickai-docs-en/function/database/data-operations.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.
