What are Filters?
Filters determine which records appear in a view by applying conditional logic. You can:- Filter by field values using comparison operators
- Combine multiple conditions with AND/OR logic
- Create nested filter groups
- Apply date-based dynamic filters
- Filter on computed fields (formulas, lookups, rollups)
40+ Operators
From simple equality to complex date ranges
Nested Groups
Build sophisticated AND/OR logic trees
Dynamic Filters
Relative dates like “Last 7 days” or “Next month”
View-Specific
Each view maintains its own filters
Filter Operators
NocoDB supports a comprehensive set of comparison operators:Text Operators
| Operator | Description | Example |
|---|---|---|
eq | Equals (exact match) | Name is “John” |
neq | Not equals | Status is not “Complete” |
like | Contains (case-insensitive) | Email contains “@gmail” |
nlike | Does not contain | Title doesn’t contain “Draft” |
empty | Is empty string | Description is empty |
notempty | Is not empty string | Notes is not empty |
null | Is null (no value) | Manager is null |
notnull | Is not null (has value) | Email is not null |
blank | Is blank (null or empty) | Address is blank |
notblank | Is not blank | Phone is not blank |
Numeric Operators
| Operator | Description | Example |
|---|---|---|
eq | Equals | Price is 100 |
neq | Not equals | Quantity is not 0 |
gt | Greater than | Age greater than 18 |
lt | Less than | Stock less than 10 |
gte / ge | Greater than or equal | Score greater than or equal to 80 |
lte / le | Less than or equal | Discount less than or equal to 50 |
btw | Between (inclusive) | Amount between 100 and 500 |
nbtw | Not between | Price not between 10 and 20 |
Boolean Operators
| Operator | Description | Example |
|---|---|---|
checked | Is checked/true | Active is checked |
notchecked | Is not checked/false | Archived is not checked |
Select Field Operators
| Operator | Description | Example |
|---|---|---|
anyof | Matches any of (OR) | Status is any of [“Open”, “In Progress”] |
nanyof | Matches none of | Priority is none of [“Low”] |
allof | Matches all of (AND) | Tags include all of [“Urgent”, “Bug”] |
nallof | Does not match all | Labels not all of [“Done”] |
is | Exact match | Category is “Sales” |
isnot | Not exact match | Type is not “Internal” |
Date & Time Operators
| Operator | Description | Example |
|---|---|---|
eq | Equals exact date | Date is 2024-01-15 |
neq | Not equals date | Due Date is not 2024-12-31 |
gt | After date | Created after 2024-01-01 |
lt | Before date | Deadline before 2024-12-31 |
gte | On or after | Start Date on or after 2024-06-01 |
lte | On or before | End Date on or before 2024-06-30 |
isWithin | Within time period | Modified is within last 7 days |
Dynamic Date Filters
TheisWithin operator supports relative date ranges:
| Sub-Operator | Description |
|---|---|
today | Today |
tomorrow | Tomorrow |
yesterday | Yesterday |
oneWeekAgo | Exactly 7 days ago |
oneWeekFromNow | Exactly 7 days from now |
oneMonthAgo | Exactly 1 month ago |
oneMonthFromNow | Exactly 1 month from now |
pastWeek | Last 7 days |
pastMonth | Last 30 days |
pastYear | Last 365 days |
nextWeek | Next 7 days |
nextMonth | Next 30 days |
nextYear | Next 365 days |
pastNumberOfDays | Custom past X days |
nextNumberOfDays | Custom next X days |
daysAgo | X days ago |
daysFromNow | X days from now |
exactDate | Specific date |
query-filter-lexer.ts:10-73
Creating Filters
Filter Structure
Filter Properties
| Property | Description | Type |
|---|---|---|
id | Unique identifier | string |
fk_view_id | View this filter belongs to | string |
fk_column_id | Field being filtered | string |
comparison_op | Operator (eq, gt, like, etc.) | string |
comparison_sub_op | Sub-operator (for dates) | string |
value | Comparison value | string |
fk_parent_id | Parent filter (for nesting) | string |
is_group | Is this a group container | boolean |
logical_op | Group logic (and/or/not) | string |
order | Display order | number |
enabled | Is filter active | boolean |
Filter.ts:26-56
Nested Filters
Create complex logic by nesting filter groups:Managing Filters
Adding a Filter
Creating Nested Filters
Updating a Filter
Deleting a Filter
Filter.ts:93-485
Sorting
Sorting controls the order in which records appear in a view. You can:- Sort by multiple fields
- Choose ascending or descending order
- Combine sorts for hierarchical ordering
- Sort on any field type including formulas
Sort Directions
| Direction | Description | Usage |
|---|---|---|
asc | Ascending (A-Z, 0-9, oldest first) | Alphabetical, chronological |
desc | Descending (Z-A, 9-0, newest first) | Reverse order |
count-asc | Count ascending (for link fields) | Fewest links first |
count-desc | Count descending (for link fields) | Most links first |
Sort.ts:22
Creating Sorts
Managing Sorts
Adding a Sort
Listing Sorts
Updating a Sort
Deleting Sorts
Sort.ts:16-278
Multi-Level Sorting
Sorts are applied in sequence. For example:- First sort: Priority (High → Low)
- Second sort: Status (A → Z)
- Third sort: Due Date (Oldest → Newest)
Combining Filters and Sorts
Filters and sorts work together:- Filters determine which records to show
- Sorts determine the order of those filtered records
Performance Considerations
Index filtered columns
Index filtered columns
Add database indexes on frequently filtered columns for better performance.
Limit filter complexity
Limit filter complexity
Deeply nested filters with many conditions can slow down queries—simplify when possible.
Use appropriate operators
Use appropriate operators
eq is faster than like. Use exact matches when you can.Filter before sorting
Filter before sorting
Filtering reduces the dataset before sorting is applied, improving performance.
Best Practices
Save common filters as views
Save common filters as views
Instead of reapplying filters repeatedly, create dedicated views with pre-configured filters.
Use dynamic date filters
Use dynamic date filters
“Last 7 days” automatically updates—better than filtering by specific dates that become stale.
Group related conditions
Group related conditions
Start with broad filters
Start with broad filters
Apply general filters first, then add specific conditions to narrow results.
Test filter logic
Test filter logic
Verify AND/OR combinations work as expected, especially with nested groups.
Document complex filters
Document complex filters
Add view descriptions explaining the purpose of complex filter configurations.
Common Filter Patterns
Show recent records
Show incomplete tasks
Show assigned to me
Related Resources
Views
Learn how filters and sorts apply to views
Formulas
Filter on computed formula fields
Fields
Understand field types and operators
API Filtering
Apply filters programmatically via API