ActiveManage Docs ← Back to activemanage.co.uk

Query Builder

Introduction to Query Builder

Query Builder is the visual, no-SQL tool for constructing data queries inside ActiveManage. Use it anywhere the platform asks “which records?” — list views, reports, dashboards, workflow rules, automation triggers.

Query Builder shown in context of three different surfaces: a list view's filter, a dashboard chart's data source, a workflow rule's trigger condition — all using the same query interface

Why Visual Querying

  • Accessible to non-developers: Operations staff can express queries without SQL.
  • Auto-validated: The platform knows your schema; invalid queries can't be saved.
  • Reusable: A query designed for a list view can be re-used for a report.
  • Permission-aware: The query respects the running user's data permissions automatically.

Where You'll See It

  • Datastore list views — filter the rows shown.
  • Dashboard widgets — define data for a chart or KPI.
  • Workflow triggers — “run this workflow when records match these conditions”.
  • Notification rules — “alert when matching records appear”.
  • Permission rules — “users in group X can see records matching these conditions”.
  • Export configurations — “export only records matching this”.

Worked Examples

  • List filter: Show only my open tickets.
  • Dashboard chart: Plot revenue for the last 12 months, by month.
  • Workflow trigger: When an order exceeds $1000, route to manager approval.
  • Permission rule: Regional managers see only customers in their region.
  • Notification: Notify the on-call team when any system error event is created with severity = critical.

Adding Filters and Conditions

Filters and conditions are the core of every query. This article shows the full toolkit and the common patterns you'll keep coming back to.

Filter row breakdown showing each part: field picker, operator dropdown, value input (which adapts based on field type — date picker for dates, dropdown for enums, text for strings); plus AND/OR connector

Anatomy of a Filter

  • Field: Any field on the source datastore, including custom fields and fields on linked records.
  • Operator: Adapted to the field type — date fields get date-specific operators, dropdown fields get is-in/is-not-in.
  • Value: Literal text/number/date, a variable (current_user, today), or another field reference.
  • Connector: AND or OR with the next condition in the group.

Operators by Field Type

  • Text: equals, not equals, contains, does not contain, starts with, ends with, matches regex.
  • Number: equals, not equals, greater than, less than, between, is null.
  • Date: equals, before, after, between, within (relative).
  • Boolean: is true, is false.
  • Dropdown/multi-select: is, is not, is in (list), is not in.
  • Linked record: is, is not, related-record matches sub-condition.

Useful Variables

  • current_user — the running user.
  • current_user.group — their primary security group.
  • today, now, yesterday, tomorrow.
  • this_week_start, this_month_start, this_quarter_start, this_year_start.
  • days_ago(n), days_from_now(n).

Worked Examples

  • My open tickets: assignee = current_user AND status = open.
  • Recently created: created_at > days_ago(7).
  • Stale items: last_activity < days_ago(30) AND status = active.
  • Date range overlap: start_date ≤ today AND end_date ≥ today.
  • Linked record condition: customer.country = UK AND total > 5000.

Sort and Group

Once you've filtered down to the right rows, sort and group control how those rows are presented. This article shows the controls and common patterns.

Query view with sort section showing primary sort 'created_at descending', secondary sort 'priority descending'; group section showing 'Group by customer' with count badges next to each group header

Sort

  • Pick a field and a direction (ascending / descending).
  • Add multiple sort keys — primary, secondary, tertiary — for tie-breaking.
  • Sort on any field including custom and computed fields.

Group

  • Pick one field to group by — rows with the same value cluster under a heading.
  • Optionally show counts per group (“Customer A (12)”).
  • Optionally show aggregates per group (sum, average, max, min).
  • Groups can be collapsed by default to keep long lists scannable.

Sort and Group Combined

Sort within groups: groups are shown by group field, and rows inside each group are sorted by the chosen sort key.

Worked Examples

  • Tickets by customer, newest first: Group by customer, sort by created_at desc within group.
  • Sales by region: Group by region, show sum(amount) per group, sort groups by sum desc.
  • Tasks by status: Group by status (Open, In Progress, Done), collapse Done by default.
  • Inventory low-stock first: Sort by stock_level asc, secondary sort name asc for alphabetical tiebreak.
  • Time-series log: Sort by timestamp desc, group by day, count per group.
Tip: Grouping can be expensive on very large datastores. If a group view feels slow, consider applying tighter filters first.