ActiveManage Docs ← Back to activemanage.co.uk

Custom Query Views

What Are Custom Query Views

Custom query views are saved, named queries that produce filtered, sorted, grouped lists of records. They're how staff carve out the specific subset of data they need to work with day-to-day, without redefining filters every time.

List view labelled 'My open high-priority tickets' showing rows filtered to status=open AND priority=high AND assignee=current_user, with grouping by customer and sort by created date desc

What a View Defines

  • Filters: Which rows to include (e.g. status=open).
  • Sort: Order rows (e.g. by created date descending).
  • Group: Optional grouping (e.g. by customer).
  • Columns: Which fields to show.
  • Column widths and order: Visual layout preferences.
  • Page size: Rows per page.
  • Sharing: Private, group, or organisation-wide.

Common Patterns

  • “My open work”: Filter assignee=current_user, status=open.
  • “Overdue items”: Filter due_date < today, status ≠ complete.
  • “This week's signups”: Filter created_at within last 7 days.
  • “Stale records”: Filter last_updated < 90 days ago, status=active.
  • “VIP customers”: Filter total_spend > threshold, status=active.

Worked Examples

  • Support agent's workspace: Three saved views — “My open tickets”, “All open tickets”, “Closed today”.
  • Sales rep dashboard: “Hot leads” (qualified + recent activity), “Pipeline” (in any active stage), “Lost deals” (status=lost in last 30 days).
  • Finance month-end: “Overdue invoices”, “Disputed transactions”, “Refunds pending”.
  • Marketplace operations: “Vendors pending review”, “High-volume sellers”, “Recent disputes”.

Building a Custom Query View

This article walks through creating a custom query view from scratch, with the most useful filter and grouping options.

Query view builder showing tabs for Filters, Sort, Group, Columns; the filter tab has rows for status=open, priority=high, with AND operator; sort by created_at desc; group by customer

Step-by-Step

  1. Open any datastore's list page (e.g. Tickets).
  2. Click Save view or pick the “New view” option.
  3. Add filters:
    • Each filter is a field + operator + value.
    • Combine with AND or OR.
    • Use special values like current_user, today, this_week, this_month.
  4. Set sort — primary, secondary, tertiary.
  5. Optionally enable grouping. Choose the field and whether to show counts per group.
  6. Pick columns. Drag to reorder. Resize column widths.
  7. Name the view (clear, action-oriented — “My open critical bugs” beats “View 7”).
  8. Set sharing — private (only you), group (members of your security group), public (everyone).
  9. Save and pin to the sidebar for one-click access.

Useful Filter Operators

  • equals, not equals.
  • contains, starts with, ends with.
  • greater than, less than, between.
  • is empty, is not empty.
  • in (matches any of a list), not in.
  • before/after (for dates).
  • relative to today (within last N days, within next N days).

Worked Examples

  • Stale leads: last_activity < today-30 AND status=open AND owner=current_user.
  • This week's signups: created_at within last 7 days, sort by created_at desc, group by source.
  • Overdue invoices: due_date < today AND status=unpaid, sort by due_date asc.
  • High-value customers: total_spend > 10000 AND status=active, group by account_manager.
  • VIP escalations: customer.tier=enterprise AND priority=high AND status=open, sort by created_at desc.

Using Query Builder

Query Builder is the underlying visual editor for filters and conditions used by Custom Query Views and many other places (reports, dashboards, workflow conditions). Learning it once means it's reusable everywhere.

Query builder UI showing a nested condition tree: 'WHERE status = open AND (priority = high OR priority = critical) AND created_at > today - 30 days'; with Add condition, Add group, Remove buttons

Building Blocks

  • Conditions: Field + operator + value, e.g. status = open.
  • Groups: Brackets containing one or more conditions combined with AND or OR.
  • Nesting: Groups inside groups for complex logic.
  • Variables: Special values like current_user, today, this_quarter.
  • Field references: Use one field's value as the comparison value (e.g. start_date < end_date).

Typical Patterns

  • “A AND B”: Two conditions in one group, AND.
  • “A OR B”: Two conditions in one group, OR.
  • “A AND (B OR C)”: Top-level group with AND; an inner group containing B OR C.
  • “NOT (A AND B)”: A group with the NOT modifier on the outside.

Worked Examples

  • Recent VIP orders: customer.tier = enterprise AND total > 5000 AND created_at within last 7 days.
  • Marketing audience: opted_in = true AND (industry = SaaS OR industry = FinTech) AND last_email_opened within last 30 days.
  • Stale handoffs: status = handed_off AND last_activity < today - 14 AND owner.is_active = true.
  • Date range check: start_date ≤ today AND end_date ≥ today — i.e. currently in range.
  • Negation: NOT (status = closed OR status = cancelled) — i.e. still open in any sense.