New request
#20932: Feature: Add BETWEEN operator for Date/Number filters (documented but not implemented)
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Summary
The official documentation states that Date and Number fields support a Between filter operator, but this
operator does not exist in the codebase. There is no way for users to filter values within a range using a single
filter chip — they must add two separate filters (IS_AFTER + IS_BEFORE) and rely on implicit AND, which is
confusing and inconsistent with the documented behavior.
Where the documentation says it works
From the public docs page "Filters & Sorting" (path:
/user-guide/views-pipelines/capabilities/filters-and-sorting):
| Field Type | Available Operators |
|---|---|
| Number | Equals, Greater than, Less than, Between, Is empty |
| Date | Equals, Before, After, Between, Is empty |
Actual code in the installed version
Checked in twentycrm/twenty:v2.1.0 (Docker image). Source of truth:
/app/packages/twenty-shared/dist/types/ViewFilterOperand.d.ts
export declare enum ViewFilterOperand {
IS = "IS",
IS_NOT_NULL = "IS_NOT_NULL",
IS_NOT = "IS_NOT",
LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL",
GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL",
IS_BEFORE = "IS_BEFORE",
IS_AFTER = "IS_AFTER",
CONTAINS = "CONTAINS",
DOES_NOT_CONTAIN = "DOES_NOT_CONTAIN",
IS_EMPTY = "IS_EMPTY",
IS_NOT_EMPTY = "IS_NOT_EMPTY",
IS_RELATIVE = "IS_RELATIVE",
IS_IN_PAST = "IS_IN_PAST",
IS_IN_FUTURE = "IS_IN_FUTURE",
IS_TODAY = "IS_TODAY",
VECTOR_SEARCH = "VECTOR_SEARCH"
}
No BETWEEN / IS_BETWEEN exists.
Expected behavior
Either:
Option A — Implement the operator (preferred):
Add IS_BETWEEN to ViewFilterOperand enum so users can pick a single chip with two date/number inputs. UI should render
two value inputs (start + end), and the backend should translate it to >= start AND <= end (inclusive) at query time.
Option B — Fix the documentation:
Remove Between from the operator tables until it is implemented, to avoid misleading users.
Actual behavior
When users try to create a "Between" filter as documented:
- The UI doesn't show a Between option in the operand dropdown.
- The only workaround is to add two separate filters (Is after + Is before) and rely on implicit AND.
- The AI assistant on docs.twenty.com (the docbot) tells users that the operator should exist and to "check their
version", which is misleading because no version currently implements it.
Reproduction
1. Create or open any view on an object with a Date field (e.g. Opportunity.closeDate, Opportunity.enrollmentDate).
2. Click + Filter → select the Date field.
3. Open the operator dropdown.
4. Expected: Between is listed.
Actual: Operator list shows Is, Is not, Is before, Is after, Is empty, Is not empty, Is in past, Is in future, Is
today, Is relative — no Between.
Environment
- Twenty server: twentycrm/twenty:v2.1.0 (Docker)
- Browser: Chrome 148 (also verified via REST API / view filter API)
- Self-hosted
Why this matters
Date-range filtering is one of the most common BI/CRM use cases (e.g. "enrollments between April 24 and May 31").
Forcing users to create two filter chips for what is conceptually a single condition:
- Is more error-prone (off-by-one with IS_AFTER being exclusive vs. IS being inclusive).
- Makes saved views harder to maintain (people forget to update both filters).
- Breaks the user's mental model that the docs explicitly promised.
Suggested implementation outline
1. Add IS_BETWEEN = "IS_BETWEEN" to ViewFilterOperand enum in twenty-shared.
2. Update the convert-view-filter-operand-to-core-operand.util.ts mapping to translate IS_BETWEEN to a SQL BETWEEN or
>= AND <= clause.
3. Update the filter UI component to render two value inputs when IS_BETWEEN is selected (similar to how IS_RELATIVE
renders a custom widget).
4. Make it available for DATE, DATE_TIME, NUMBER, NUMERIC, CURRENCY field types.
Workaround for users in the meantime
Until implemented, users can simulate Between via two filters:
- Filter 1: field Is after <start_date - 1 day> (since IS_AFTER is exclusive)
- Filter 2: field Is before <end_date + 1 day> (since IS_BEFORE is exclusive)
Or use Is relative / Is during for dynamic ranges (This week, Last 30 days, etc.) when applicable
New BETWEEN filter operator requires coordinated changes across shared types, frontend filter UI, and backend query generation.
- packages/twenty-shared/src/types/ViewFilterOperand.ts
- packages/twenty-front/src/modules/views/components
- packages/twenty-front/src/modules/object-record/record-filter
- packages/twenty-server/src/engine/api-modules/filter