Filter Records
This node queries the database for records matching specific criteria.
The Filter Records (or Query Records) node performs a search against a database collection.
The Filter Records node allows you to retrieve a list of records from the database. You can filter by any field, sort the results, and limit the number of items returned. It supports both a visual query builder and raw JSON queries for advanced users.
General
| Data | Description |
|---|
| Class | The database collection to query. |
| Filter | "Visual" (default) or "Javascript" (JSON). |
Filter (Visual Mode)
| Data | Description |
|---|
| Filter | A visual query builder. Click to add rules (e.g., Name equals "Alice"). |
| Sorting | A visual sort builder (e.g., Created At Descending). |
Filter Parameters
| Data | Description |
|---|
| * | Dynamic inputs generated from variables used in the visual filter (e.g., if you filter by Name equals {nameVar}, a nameVar input appears). |
Limit
| Data | Description |
|---|
| Use limit | Boolean. Enable pagination controls. |
| Limit | Max records to fetch. Default: 10. |
| Skip | Records to skip (offset). Default: 0. |
Actions
| Signal | Description |
|---|
| Do | Triggers the database query. |
Outputs
General
| Data | Description |
|---|
| Items | The list of records found (Array). |
| Count | The number of items in the returned list. |
| First Record Id | The ID of the first item (convenience). |
| Is Empty | True if no records were found. |
Events
| Signal | Description |
|---|
| Success | Triggered when data is received. |
| Failure | Triggered on network or query error. |
Usage
Searching
- Select Class: "Products".
- In Filter, add rule:
Name matches regex {searchTerm}.
- Connect a Search Bar text to the
searchTerm input.
- Trigger Do.
- Connect Items to a Repeater to show results.
- Enable Use limit.
- Set Limit to 20.
- Create a "Page Number" variable.
- Connect
(Page Number * 20) to Skip.
Detailed Behavior
- Live Updates: The node listens for changes. If a new record is created that matches your filter, it is automatically added to the Items list without needing a re-fetch.
- Server-Side: Unlike "Array Filter", this runs on the database server, making it efficient for large datasets.
Troubleshooting
- No Results: Check your filter logic. "Equals" is exact (case-sensitive). Try "Matches RegEx" for fuzzy search.