Skip to main content

Query Builder

The Query Builder is where administrators create virtual views — named queries that draw on custom field data and system tables to produce structured datasources. These datasources power dataviews, charts, interfaces, lookup lists, and Jinja-based outputs such as Word reports and reference number templates.

The Query Builder is a visual, drag-and-drop tool designed for administrators who need to shape and join data without writing SQL directly. For advanced use cases, the underlying query language is also available. See Query Language Reference.

Who configures this

Administrators with access to the New module. The Query Builder is accessible from New > Custom Fields & Configuration > Query Builder.

What the Query Builder produces

Each saved query becomes a virtual view — a reusable datasource that other parts of the system can reference by name.

OutputHow it uses the virtual view
DataviewsDisplay query results as a browsable document list in Explorer
Chart BuilderDrives charts and visualisations in interfaces and dashboards
Interface BuilderSupplies data grids and chart components in custom interfaces
Lookup ListsSources dropdown values for custom field templates
Word TemplatesProvides the data layer that Jinja-based Word reports draw from
Reference Number TemplatesSupplies dynamic field values for generated reference numbers

Before you start

  • Custom field templates must exist first. Virtual views are built from custom field data. The templates that define that data must be created and populated before they can be queried. See Custom Field Templates.
  • Understand the output destination. Whether the view is intended for a dataview, a chart, a lookup list, or a report affects which fields and joins are needed.

In this section

PageWhat it covers
Query Builder InterfaceThe Virtual Views list, the Query Lab canvas, and how to build and save a query
Query Language ReferenceThe JSON-based DSL used for advanced queries, including all supported functions and operators
  • Custom Fields — the data layer that virtual views are built from
  • Virtual Interfaces — how the Query Builder connects to the Chart Builder and Interface Builder
  • Lookup Lists — lookup lists sourced from virtual views