Base Filtering & Queries
Filtering is one of the most powerful features in Bases, allowing you to narrow down large datasets to exactly what you need. Lokus v1.3 supports comprehensive filtering with multiple operator types and complex query combinations.
Prerequisites: This guide builds on Bases Overview and Properties. Start there if you’re new to Bases.
Filter Types & Operators
Text Operators
Filter text-based properties with precision.
Available Operators:
equals # Exact match (case-sensitive)
not_equals # Not equal
contains # Contains substring
not_contains # Doesn't contain substring
starts_with # Starts with text
ends_with # Ends with text
is_empty # No value or empty string
is_not_empty # Has a value
matches_regex # Regular expression matchExamples:
# Find notes titled exactly "Project Alpha"
title equals "Project Alpha"
# Find notes with "urgent" anywhere in title
title contains "urgent"
# Find notes starting with "WIP:"
title starts_with "WIP:"
# Find notes with empty description
description is_empty
# Find notes matching pattern
title matches_regex "^PRJ-\d{4}$"Use Cases:
- Finding specific projects by name
- Identifying incomplete records
- Pattern matching for codes/IDs
- Text content searches
Tip: Use
containsfor flexible searches,equalsfor exact matches. Most searches benefit fromcontains.
Number Operators
Filter numeric properties with mathematical precision.
Available Operators:
equals # Equal to
not_equals # Not equal to
greater_than # >
greater_than_or_equal # >=
less_than # <
less_than_or_equal # <=
between # Between two values (inclusive)
is_empty # No value set
is_not_empty # Has a valueExamples:
# High priority items (score > 80)
priority_score greater_than 80
# Budget between $10K and $50K
budget between 10000 50000
# Items with cost assigned
cost is_not_empty
# Exact quantity match
quantity equals 100
# Low stock items
stock_quantity less_than 10Use Cases:
- Budget filtering
- Score/rating ranges
- Quantity thresholds
- Performance metrics
Warning:
betweenis inclusive on both ends.between 10 20includes both 10 and 20.
Date Operators
Filter date properties with both absolute and relative date logic.
Available Operators:
equals # Exact date match
before # Before date
after # After date
between # Between two dates
relative # Relative to today (see below)
is_empty # No date set
is_not_empty # Has a dateRelative Date Options:
last 7 days # Past week
last 30 days # Past month
this week # Current week (Mon-Sun)
this month # Current calendar month
next week # Upcoming week
next month # Upcoming month
today # Today only
yesterday # Yesterday only
tomorrow # Tomorrow onlyExamples:
# Due today
due_date equals today
# Overdue items
due_date before today
# Due in the next week
due_date between today next_7_days
# Items due this month
due_date relative "this month"
# Recently modified
modified_date relative "last 7 days"
# No due date set
due_date is_emptyUse Cases:
- Overdue task detection
- Recently created/modified items
- Upcoming deadlines
- Scheduling and planning
Tip: Relative dates update automatically! “last 7 days” always means the most recent week, no manual updates needed.
Array Operators (Tags/Multi-Select)
Filter properties with multiple values.
Available Operators:
contains_any # Contains any of the specified values
contains_all # Contains all specified values
is_empty # Empty array or no tags
is_not_empty # Has at least one tagExamples:
# Items tagged with "urgent" OR "high-priority"
tags contains_any ["urgent", "high-priority"]
# Items tagged with BOTH "web" AND "frontend"
tags contains_all ["web", "frontend"]
# Untagged items
tags is_empty
# Items with at least one category
categories is_not_emptyUse Cases:
- Multi-category filtering
- Skill matching
- Tag-based organization
- Feature flag filtering
Tip: Use
contains_anyfor broad searches (OR logic),contains_allfor specific combinations (AND logic).
Boolean (Checkbox) Operators
Filter true/false properties.
Available Operators:
is_true # Value is true
is_false # Value is false
is_empty # No value set (neither true nor false)Examples:
# Completed items
completed is_true
# Incomplete items
completed is_false
# Items without published status set
is_public is_empty
# Active items
is_active is_trueUse Cases:
- Task completion status
- Published/draft filtering
- Active/inactive records
- Feature toggles
Filter Groups
Combine multiple filters using logical operators to create complex queries.
AND Logic
All conditions must be true.
Syntax:
Show entries where:
status equals "Active"
AND priority equals "High"
AND assignee is_not_emptyExample:
Find high-priority active tasks that are assigned:
- Status = Active Yes
- Priority = High Yes
- Assignee = Sarah Yes
Result: IncludedUse Cases:
- Finding very specific items
- Narrowing down large datasets
- Strict criteria matching
OR Logic
Any condition can be true.
Syntax:
Show entries where:
status equals "Urgent"
OR priority equals "Critical"
OR due_date before todayExample:
Find items needing attention (any of these):
- Status = Urgent Yes
- Priority = Normal No
- Due Date = Yesterday Yes
Result: Included (met OR condition)Use Cases:
- Broadening search results
- Multiple acceptable criteria
- “Any of these” scenarios
NOT Logic
Invert a condition.
Syntax:
Show entries where:
NOT status equals "Cancelled"
AND NOT status equals "Done"Equivalent to:
status not_equals "Cancelled"
AND status not_equals "Done"Use Cases:
- Excluding specific values
- “Everything except…” queries
- Negative filtering
Nested Groups
Create complex logic with nested groups.
Example 1: Urgent items or overdue high-priority items
Show entries where:
status equals "Urgent"
OR (
priority equals "High"
AND due_date before today
)Breakdown:
Include if:
Status is Urgent
OR
(Priority is High AND Due Date is in the past)Example 2: Active projects in specific categories
Show entries where:
status equals "Active"
AND (
category equals "Web"
OR category equals "Mobile"
OR category equals "API"
)
AND assignee is_not_emptyBreakdown:
Include if:
Status is Active
AND
Category is Web, Mobile, or API
AND
Has an assigneeTip: Use parentheses to group conditions clearly. This makes complex queries easier to understand and maintain.
Creating Filters
Method 1: Interactive Filter Builder
- Open your Base
- Click “Filter” button in toolbar
- Click ”+ Add Filter”
- Select property
- Choose operator
- Enter value(s)
- Click Apply
Method 2: Quick Filters
Click any cell value to create instant filter:
- Right-click a cell
- Select “Filter by this value”
- Filter applied immediately
Method 3: Text Query
Advanced users can type queries directly:
status:Active AND priority:HighQuery Syntax:
property:value # Equals
property:!value # Not equals
property:>value # Greater than
property:<value # Less than
property:*partial* # Contains
tag:#tagname # Has tagSaved Filters
Creating Saved Filters
Save commonly-used filter combinations:
- Configure your filters
- Click “Save Filter” button
- Name the filter (e.g., “Overdue High Priority”)
- Optional: Set as default view
- Click Save
Example Saved Filters:
"Active Tasks":
- status equals "Active"
- assignee is_not_empty
"Overdue Items":
- due_date before today
- completed is_false
"This Week":
- due_date relative "this week"
- status not_equals "Done"
"Unassigned High Priority":
- priority equals "High"
- assignee is_emptyManaging Saved Filters
Quick Switch:
- Click filter dropdown
- Select saved filter
- View updates instantly
Edit Filter:
- Select saved filter
- Click “Edit” (pencil icon)
- Modify filters
- Save or Save As New
Delete Filter:
- Select saved filter
- Click “Delete” (trash icon)
- Confirm deletion
Share Filter:
- Right-click filter name
- “Copy Filter Link”
- Share with team members
Tip: Create saved filters for your most common workflows. Examples: “My Tasks”, “This Sprint”, “Needs Review”.
Pre-built Filters
Lokus includes useful pre-built filters:
All Items
# No filters (default)Active Items
status not_equals "Done"
AND status not_equals "Cancelled"
AND status not_equals "Archived"Completed Items
status equals "Done"
OR completed is_trueOverdue Items
due_date before today
AND completed is_falseAssigned to Me
assignee equals "{{current_user}}"Unassigned
assignee is_emptyThis Week
due_date relative "this week"No Due Date
due_date is_emptySorting
Sort Options
Order your filtered results:
Sort Configuration:
sort:
- property: priority
direction: desc # High to Low
- property: due_date
direction: asc # Earliest to Latest
- property: title
direction: asc # A to ZSort Types:
- Alphabetical: A-Z or Z-A
- Numeric: 0-9 or 9-0 (ascending/descending)
- Date: Earliest-Latest or Latest-Earliest
- Custom: Manual drag-and-drop order
Multi-Column Sorting
Sort by multiple properties:
- Click first column header (primary sort)
- Hold
Cmd/Ctrland click second header (secondary sort) - Hold
Cmd/Ctrland click third header (tertiary sort)
Example:
Sort by:
1. Priority (High → Low)
2. Due Date (Earliest → Latest)
3. Title (A → Z)
Result:
High Priority items first, ordered by due date
Medium Priority items next, ordered by due date
Low Priority items last, ordered by due date
Within each group, alphabetically by titleManual Sorting
Custom drag-and-drop ordering:
- Click “Manual Sort” toggle
- Drag rows to reorder
- Order persists across sessions
- Click “Reset Sort” to return to automatic
Warning: Manual sort overrides automatic sorting. Use for custom prioritization, but remember to reset if you want automatic sorting later.
Grouping (Coming v1.4)
Group By Property
Organize filtered entries into groups:
Example:
Group by: Status
├─ Backlog (5 items)
│ ├─ Task A
│ ├─ Task B
│ └─ Task C
│
├─ In Progress (3 items)
│ ├─ Task D
│ └─ Task E
│
└─ Done (12 items) [collapsed]
└─ (Hidden)Multi-Level Grouping
Group by: Status → Priority
├─ In Progress
│ ├─ High (2 items)
│ │ ├─ Task A
│ │ └─ Task B
│ └─ Medium (1 item)
│ └─ Task C
│
└─ Done
└─ High (3 items)
└─ ...Group Aggregations
Show statistics per group:
Status: In Progress (3 items)
Total Hours: 15h
Average: 5h per item
Assignees: Sarah, John
Status: Done (12 items)
Total Hours: 48h
Average: 4h per item
Completion Rate: 100%Advanced Query Examples
Example 1: This Week’s Priorities
Show entries where:
(
due_date relative "this week"
OR priority equals "High"
)
AND status not_equals "Done"
AND assignee equals "{{current_user}}"Use Case: See your high-priority work and this week’s deadlines
Example 2: Stale Projects
Show entries where:
status equals "Active"
AND modified_date before "{{today-30d}}"
AND assignee is_not_emptyUse Case: Find active projects not updated in 30+ days
Example 3: Urgent Attention Needed
Show entries where:
(
due_date before today
OR priority equals "Critical"
)
AND completed is_false
AND (
status equals "Blocked"
OR assignee is_empty
)Use Case: Overdue or critical items that are blocked or unassigned
Example 4: Ready to Start
Show entries where:
status equals "Todo"
AND assignee is_not_empty
AND tags contains_any ["ready", "approved"]
AND due_date is_not_emptyUse Case: Tasks ready to be worked on (assigned, approved, scheduled)
Example 5: Portfolio View
Show entries where:
category contains_any ["Web", "Mobile", "API"]
AND budget greater_than 10000
AND (
status equals "Active"
OR status equals "Planning"
)Use Case: Major projects in specific categories
Performance Tips
Optimize Filters for Large Datasets
Do:
-Use specific filters early (e.g., folder source)
-Filter by indexed properties (status, dates)
-Use equals instead of contains when possible
-Limit results with pagination
-Enable Quantum Search
Don’t:
-Use only contains with wildcards on large datasets
-Create overly complex nested groups (3+ levels)
-Use regex filters on non-indexed fields
-Leave filters too broad (returning 1,000+ results)
Filter Execution Order
Filters execute in this order for best performance:
- Source filters (folder, tag)
- Indexed properties (status, dates, booleans)
- Simple comparisons (equals, not_equals)
- Range comparisons (greater_than, between)
- String operations (contains, starts_with)
- Complex operations (regex, nested groups)
Tip: Put more restrictive filters first. “status equals Active” before “title contains Project” performs better.
Troubleshooting
Filters Not Working
Issue: No results or wrong results
Solutions:
- Check filter logic (AND vs OR)
- Verify property names match YAML
- Ensure values are correctly formatted
- Check for empty/null values
- Refresh Base index (Cmd/Ctrl + R)
Slow Filter Performance
Issue: Filters take too long to apply
Solutions:
- Reduce number of entries (use source filters)
- Enable Quantum Search
- Simplify complex nested groups
- Use indexed properties when possible
- Close other Bases to free memory
Filter Not Saving
Issue: Saved filter doesn’t persist
Solutions:
- Ensure filter has a name
- Check for permission issues
- Verify workspace is syncing properly
- Try duplicating the view first
What’s Next?
- Views - Learn how filters work with different view types
- Properties - Understand property types for better filtering
- MCP Integration - Use AI to create complex filters
- Examples - See real-world filtering scenarios