Zoomed Image

Creating a Query

xAssets Configuration Guide
Queries and Reports

Creating a Query

This page explains how to create new queries in xAssets. There are several ways to create a query, depending on whether you want to start from scratch or clone an existing one.

Prerequisites

You must have Configuration or Administrator user group permissions to create queries.

Methods for Creating a Query

1. Create a New Empty Query

Click the New button button in the query list, or choose New Query from the Query Editor menu above the list.

This creates a blank query. You must specify the subject, type, and then add columns.

2. Clone from the Query List

Select an existing query in the list and click the Clone button button, or choose Clone Query from the Query Editor menu.

3. Clone from Within the Query Editor

Open an existing query and click the Clone button button in the editor toolbar.

4. Clone from the Find Dialog

When finding a query (e.g., by clicking Edit button without a selected query), click the New Query button button in the Find dialog.

Tip: Cloning copies both the query definition (columns, filters, variants) and its report layout. This is the fastest way to create a new query -- find a similar existing query, clone it, then adjust the columns and filters. Most queries in xAssets were built by cloning and modifying an existing one.

Steps to Create a Query from Scratch

  1. Navigate to Admin > Queries > Queries and Reports.
  2. Click New Query.
  3. Enter a Query Name that clearly describes what the query shows (e.g., "Assets by Location with Warranty Status").
  4. Select the Subject -- this determines which database table the query operates on and which columns are available (e.g., Assets, Custodians, Contracts).
  5. Select the Type -- this categorises the query's purpose (e.g., Standard, Filter, Search). Some types display an information alert explaining their use.
  6. Optionally set a Context to associate the query with specific Query Header/Footer menus.
  7. Switch to the Query Columns tab and use Insert Columns to add columns from the list of available fields.
  8. Configure column display properties (width, display type, formatting) as needed.
  9. Add filter conditions to restrict the results.
  10. Save the query.
  11. Run the query to verify it returns the expected results.

Steps to Create a Query by Cloning

  1. Find an existing query that is similar to what you need.
  2. Clone it using one of the methods above.
  3. Change the Query Name to describe the new query.
  4. Adjust the columns -- add, remove, or reorder as needed.
  5. Modify the filter conditions.
  6. Save and test.

After Creating a Query

After creating a query, you may want to: