Skip to main content

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.

Inputs

General

DataDescription
ClassThe database collection to query.
Filter"Visual" (default) or "Javascript" (JSON).

Filter (Visual Mode)

DataDescription
FilterA visual query builder. Click to add rules (e.g., Name equals "Alice").
SortingA visual sort builder (e.g., Created At Descending).

Filter Parameters

DataDescription
*Dynamic inputs generated from variables used in the visual filter (e.g., if you filter by Name equals {nameVar}, a nameVar input appears).

Limit

DataDescription
Use limitBoolean. Enable pagination controls.
LimitMax records to fetch. Default: 10.
SkipRecords to skip (offset). Default: 0.

Actions

SignalDescription
DoTriggers the database query.

Outputs

General

DataDescription
ItemsThe list of records found (Array).
CountThe number of items in the returned list.
First Record IdThe ID of the first item (convenience).
Is EmptyTrue if no records were found.

Events

SignalDescription
SuccessTriggered when data is received.
FailureTriggered on network or query error.

Usage

Searching

  1. Select Class: "Products".
  2. In Filter, add rule: Name matches regex {searchTerm}.
  3. Connect a Search Bar text to the searchTerm input.
  4. Trigger Do.
  5. Connect Items to a Repeater to show results.

Pagination

  1. Enable Use limit.
  2. Set Limit to 20.
  3. Create a "Page Number" variable.
  4. 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.