The query builder lets you define custom logic to filter or group data based on specific conditions. It’s a flexible tool used throughout the app—wherever you need to work with dynamic sets of users, assets, or work orders.
Where It’s Used
The query builder is used across the system for different purposes:
- Custom views – Filter assets or work orders to display only relevant records in tables.
- User groups – Group users based on shared attributes (e.g. role, location).
- Permission components – Filter assets or work orders based on their fields. These components can later be combined with user groups to define access rules.
More use cases may be added in the future as the system evolves.
Key Elements
- Rule
A single statement that defines a filter condition. Each rule has:- Subject – The field you want to filter (e.g. City, Role, Year). Subjects come from custom fields you’ve created, but can also include built-in system properties, such as hierarchy level, workflow status, or other metadata—depending on where the query builder is used.
- Condition – How the field is compared (e.g. is, contains, greater than). More about conditions see below.
- Value – What the field is compared to (e.g. Helsinki, Supervisor, 2025). Free text field.
- Operator
Defines the logic between rules or inside a group. You can switch the operator by clicking the AND/OR toggle at the top-left corner.- AND – All rules must be true
- OR – At least one rule must be true
- Group
A group is a container for nested rules (or other groups) using a shared operator.
Groups let you build complex queries by combining different sets of rules.
You can create up to 4 levels of nested groups.
Adding Rule
- Choose a Subject from the dropdown.
- Select a Condition.
- Enter or select a Value, if required.
- Use the ➕ icon to add more rules.
- Remove any condition using the X icon.
Available Conditions
The list of conditions depends on the field type—Text, Dropdown, Numeric, or Date. Some conditions are shared across types.
Universal
• Contains data / Doesn’t contain data
Use when you only need to check whether a field has any value or is empty.
ℹ️ If you want to include all items, use the Contains data condition — as long as the subject is a required field. For example: Hierarchy level → Contains data will return all assets, because every asset must have a hierarchy level.
Text and Numeric Fields
• Is / Is not
Check if the value matches (or doesn’t match) exactly what you specify.
Numeric Fields Only
• Greater than / Less than
• Greater than or equals / Less than or equals
Date Fields Only
• On
• Before / After
• On or before / On or after
• Yesterday
• Today
• Tomorrow
• Last X days / Last X weeks / Last X months
• Next X days / Next X weeks / Next X months
Grouping Conditions (Nested Logic)
For more advanced filtering, you can group multiple conditions using AND/OR logic.
Click the group icon (➕➕) in the top-right corner to create a nested block of conditions
Example
You want to include users who:
- Work in Helsinki or Tampere,
- AND have the role Technician.
This setup would look like: