Skip to main content
CYPEX Documentation
Support
v2.0.0 Latest stable release View changelog ->
Meta Referencegenerated

Meta Query

Invisible query loader that exposes `data`, `loading`, and `error` selectors.

Technical id
meta_query
Translation keys
label
Editable
No (system element)
Toolbox
Hidden from element menu

Invisible element that runs a data query and exposes data, loading, and error selectors for other elements on the page.

When to use

  • A page needs a query result no visible element already loads — e.g. a KPI count, a lookup, or an aggregate used by several expressions.
  • Two or more elements should share the same query result instead of each fetching it independently.
  • It is typically created under the hood by other templates when they need shared query data.

What you need

Points at a view/query via dataSource.queryName, optionally with a fixed filter expression and a response format. It renders nothing; failures only surface when another element reads its error selector.

Examples

  • Loading a single aggregate row to title a dashboard.

Avoid

  • Adding it when a visible element on the page already loads the same rows — read from that element instead.
  • Using it to fetch large result sets for display; use a Table/List for paging, sorting, and dense layouts.
  • Creating multiple meta queries when one shared query result could be read by several consumers.

Editor properties

Configure these in the Application Designer property panel. Group headings mirror the editor where possible. Data Source is where the element gets its rows or field binding (a view/query, a connector operation, or a parent form field). References appear only for view-backed sources and map foreign-key ID columns to readable labels from another view.

Data SourcerequiredSettings group
Where this element loads its data (view, query, connector, or element).
Default: {"queryName":""}
FilterrequiredCustom expression
Row filter applied when loading data.
Default: buildCustomExpressionValue("null")
Initial LoadrequiredYes / no
Configuration for initial Load.
Default: true
Load on ChangerequiredYes / no
Configuration for load On Change.
Default: true

Inside dataSource: (dataSource)

Query NamerequiredText
Named query or server query that supplies data.
Default: none
Response FormatoptionalOne of: json, geo, text, xml, bytea (or not set)
Configuration for response Format.
Choices
  • json
  • geo
  • text
  • xml
  • bytea
Default: none

Sizing

  • Default size when dropped on a page: 0 × 0.

Values you can read in expressions

Other parts of your app can read live values from this element in custom expressions:

elements.todosQuery.<property>

loading boolean Indicates if the data is in process of being loaded from the server. elements.todosQuery.loading

When True while fetching. Guard anything that would otherwise show a wrong figure before the data arrives.

error string Error message when the last operation failed. elements.todosQuery.error

When The only way a failure surfaces — the element itself renders nothing, so expose this in a status component if the query can fail.

data Array<object> The data rows. elements.todosQuery.data

When The fetched rows (or shaped result). Every consumer reads it by expression (e.g. `elements.<id>.data`).

To use one of these, open the property you want to drive on the other element, switch it to expression mode in the Expression Editor, and enter:

1
elements.todosQuery.data

Replace todosQuery with this element’s unique id. Select the element in Application Designer and copy the id chip at the top of the right-hand property panel.

Where you can place it

Internal element: not draggable by builders. It is created and configured automatically by other elements/templates that need data.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "config": {
    "dataSource": {
      "queryName": "todos",
      "responseFormat": "json"
    },
    "filter": "@@expression:'value'",
    "initialLoad": false,
    "loadOnChange": false
  }
}