Query with predefined filters card
This card combines a free-form query with curated filter chips and publishes one entity search.
When to use it
Use it when readers need both guided common filters and an advanced query box in the same one-row control.
Live example
The Card Lab replaces autocomplete and saved-search reads with deterministic in-browser fixtures.
Open the Query with predefined filters Card Lab in a new page
Requirements
| Requirement | Value |
|---|---|
| Dashboard types | Standard |
| Minimum size | 4 columns by 1 row; maximum height is 1 row |
| Data | The selected entity context |
| Backend capabilities | Entity search, global autocomplete fields, and saved searches |
| Permissions | Entity read access and saved-search permissions for persistence actions |
Configuration
The paths below are relative to cardConfig.data.
entityType
| Property | Value |
|---|---|
| Type | string |
| Required | Yes |
| Default | No default |
| Values | device, interface, client, or group |
Selects the entity search updated by the control.
predefinedSearches
| Property | Value |
|---|---|
| Type | Array of objects |
| Required | No |
| Default | Empty array |
| Values | Curated search definitions |
Defines the filter chips displayed beside the free-form input.
predefinedSearches[].name
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | Runtime sorting label none |
| Values | Short chip label |
Sets the visible chip text.
predefinedSearches[].query
| Property | Value |
|---|---|
| Type | Neops search query string |
| Required | No |
| Default | * while parsing |
| Values | A query accepted by the Neops query parser |
Sets the chip’s search expression.
predefinedSearches[].sortPriority
| Property | Value |
|---|---|
| Type | Integer |
| Required | No |
| Default | Runtime priority 9 |
| Values | Lower values sort first |
Controls chip order.
chainWith
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | AND |
| Values | AND or OR |
Joins the entire free-form query with the entire predefined-filter expression. Readers can toggle this operator in the card.
localCardFilter
| Property | Value |
|---|---|
| Type | JMESPath expression |
| Required | No |
| Default | No filter |
| Values | An expression returning an array |
Filters the card’s subscribed data and controls its no-data message.
Examples
Interface search with state chips
{
"cardId": "query-with-predefined-filters",
"data": {
"entityType": "interface",
"chainWith": "AND",
"predefinedSearches": [
{ "name": "Up", "query": "state: UP", "sortPriority": 1 },
{ "name": "Down", "query": "state: DOWN", "sortPriority": 2 }
]
}
}
A typed query and the selected state expression are parenthesized and joined with AND.
Behavior
An empty free-form side or chip side contributes *.
The card writes a query shaped as (<typed query>) AND|OR (<chip query>), restores both controls from compatible external filter updates, and supports saving or deleting searches.
Limitations and safety
State recovery expects a top-level AND or OR expression with two children.
Saved-search actions persist backend data.
Related cards
See Query box and Predefined Searches.

