Custom Queries

A Custom Query is a powerful tool that allows you to define personalized data retrieval criteria, enabling you to fetch specific information from your Workmaster application. You can create custom queries to generate detailed reports, analyze specific data, or pull information based on your unique needs. Custom queries can help you to target specific fields, apply advanced filters, and aggregate data in a way that suits your business logic.

Once created, a custom query appears in the Page tab as a container that can be added to display query results.

This guide explains how to create, manage, and use custom queries to retrieve data and generate reports for your application.

Types of Queries

  1. Join Query A Join Query combines data from two or more tables using a common field, providing a unified view of related data.

  2. Union Query A Union Query merges rows from multiple tables or queries that share the same structure, producing a single dataset without duplicates.


Creating a Join Query

  1. Open the Actions menu and select New Custom Query.

  2. Choose Join Query and click Next.

  3. From the list of existing data models, select a base query and click Next.

  4. Enter a name for the query and click Finish.

  5. The join query is created with fields from the base query.

To add a field:

  1. Click the + icon next to a field.

  2. In the Create join on ‘field_name_selected’ dialog, select a data model.

  3. Choose the field to join on.

  4. Click Finish.


Creating a Union Query

  1. Open the Actions menu and select New Custom Query.

  2. Choose Union Query and click Next.

  3. From the list of existing data models, select a base query and click Next.

  4. Enter a name for the query and click Finish.

  5. A canvas for rows and columns appears, allowing you to add fields from data models.

To add rows and columns:

  1. Click + below a row to add a data model.

  2. Select the data model.

  3. Click + on the right side to add corresponding columns.

  4. Select fields from the chosen data model.


Deleting a Custom Query, Row, or Column

A icon appears next to each query, row, or column. Click the icon to remove the selected item.

Last updated