On this page
List selectors reference
Look up list queries, comparison operators and text search.
Before you begin: Data roots reference.
List Query
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
Use that selector with f-list="$state.products". The Frontbacked response for the list is also available through $lists.<listId> and includes paging metadata plus items. Each item has the same visible post data shape as a single post lookup, including id, type, createdOn, and updatedOn.
Those root fields are the system-generated post values added by Frontbacked when posts are read as list items.
Inside an f-list template, $ is the current item:
Saved-data and local-data lists use keyed rendering. Each item needs id; otherwise add f-key="expression" to the repeated first-child template. Keys must be present and unique. Frontbacked then preserves matching DOM nodes when live data changes or a list is reordered.
Selector Operators
Use $where objects for list and aggregate filters. Plain keys inside $where are equality checks. Add a comparison suffix for non-equality checks:
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
Supported suffixes are $gt, $gte, $lt, $lte, $ne, $contains, $startsWith, and $endsWith. Use $and or $or with arrays for grouped logic:
In f-text and other raw FQL attributes, $now can be written with or without quotes when it is the whole value:
Both forms resolve $now to the page's current-time snapshot. In {STATE} selectors, $now may be written bare in JS-style state declarations or as "$now" in JSON-compatible state. For transaction filters, use expiresOn, not expires.
Text Search
Use $search alongside $where in a list selector when the visitor should search across one or more text fields. $where restricts which records qualify; $search finds matches within those records. Nesting $search inside $where is not supported. $search can be a string or an object with $term and $fields:
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
Frontbacked splits the search term into words and requires each word to appear in at least one searched field. Prefer marking fields with searchable: true in your FRL schema, then use $search: "$state.filters.search" without $fields. Frontbacked keeps that search content up to date automatically. An explicit $fields list overrides the schema selection while respecting field visibility. If a schema has no searchable declarations, omitting $fields keeps the existing search across readable post data.
Continue with Aggregates reference.