Queries allow for users to search in AiM with a defined set of criteria. The search criteria fields contain operators that can be used to search records in different ways, such as “Starts with”, “Ends with”, or “Contains”.
Why will a Query help me? When using a database full of information you will want to retrieve very specific records. These records can be obtained by utilizing a query.
![]() ![]() A search/query exists for every single record in AiM A search/query exists for every single record in AiM Queries do not work like Google, Yahoo, and other search engines where you can use multiple words in a single field and get related results. Though the results will be different, every Query screen will have the same buttons and options for building and saving the search. The part that changes is the data being searched for within the record.
Examples of some common Queries
Examples of some common Queries
|
Queries allow for users to search in AiM with a defined set of criteria.
The search criteria fields contain operators that can be used to search records in different ways, such as “Starts with”, “Ends with”, or “Contains”.
To navigate to a query screen, from the WorkDesk, click on any module in the left hamburger icon Menu. In the next screen, you will find additional left menu options, some of which have a magnify glass icon next to them. ![]() Click on a magnify glass icon next to your menu choice for which you would like to create a query for. These three buttons can be found at the top-left of a query screen: ![]() ![]()
Basic vs Advanced Search Basic vs Advanced Search
Below is a screenshot of the search page for Asset Package, under the Asset Management module. Under Action in the left menu, you will find the link to open and begin creating a New Query. Below Action, View will be empty until the Query has been saved.
![]() |
A query screen might have multiple tables involved. The Primary Table is listed first. After that, each additional table will have its own Heading Bar. If the header is indented, the table is subordinate to the table above it. In the screenshot example below, the Notes Log table is a Subordinate Table to the Primary Table (which is always the top-most table of a query screen). ![]() |
Subordinate Tables will either have the Display Order column and its sort options, or the Header Operations (Operator dropdown list next to the header). It cannot have both. The Subordinate Tables without the Display Order column options cannot be displayed in the final query results. In the screenshot below, red boxes around columns can be displayed (tables with display order boxes) and green can’t (no display order boxes, but they have header operations/operator dropdown list next to the header). ![]() Both display order and header operations are described later in this tutorial. |
Below are detailed descriptions for navigating the screens found when creating a Query.
From your WorkDesk, click on the hamburger icon on the left to expand your top-most search options/how you want to start your search. Summary of the screenshot, below:
![]() |
![]() |
Below is the Query screen, after clicking Search on a Record. Some primary features of this screen include:
![]() |
This is the query screen of a record (the level selected under a module). To start a new query, click on New Query under Actions in the left menu. ![]()
![]() After all criteria are entered, click Save to save the query. ![]() Selecting Execute in the following screen will take you to the results/Browse View of the query. |
In your query search results, click on a Record link to display the details of that record. Or, you can click the blue Search button to return to the Query screen (second screenshot, below) on the record level under the module you chose (in this example, Personal Query). ![]() ![]() |
Queries can be built and saved for future use. Queries you have already created can also be edited and either replace the original query or saved as a completely new one. Queries can be built and saved for future use. Queries you have already created can also be edited and either replace the original query or saved as a completely new one. ![]() |
![]()
![]()
By default, Personal Queries are “personal” to the user that created them, and are not visible to other logins, until shared with other groups. By default, Personal Queries are “personal” to the user that created them, and are not visible to other logins, until shared with other groups. ![]() |
Display Order is a functionality of the Query screen that allows you to set the order of the columns of information that will show up in the search results screen. By default, each query will display a set of predetermined fields. These can be overridden by placing numbers in this box. Once a number is entered, only numbers with values entered will be displayed. It’s best to start with numbers like 10, 20, 30, etc. to allow other elements to be added in between without having to renumber other fields. Consecutive numbers are not required. All of this is explained in more detail later in this section. ![]() Here, we’ll start with a basic search query to walk through the details of using the Display Order feature.
![]()
![]()
![]()
![]()
In this example, we want the columns of data in our search results to be presented in this order: Work Orders, Phase, Phase Description, Status, and Shop. [Display Order - 5] Displays the Work Order number first/in the 1st column of our search results because 5 is the smallest number we enter in a Display Order field for this search. Typically all that is needed in a search at the work order level is the work order number. ![]() [Display Order - 10] Display the Phase number next/in the 2nd column of our search results because 10 is the 2nd smallest number we enter in a Display Order field. [Display Order - 20] Display the phase Description. The phase Description will show up in the 3rd column of our search results because 20 is the 3rd smallest number entered in a Display Order field for this search. [Display Order - 30] Displays the Status in the 4th column. Select the operator to make the search more meaningful. In this example (below) Closed, Closing, Incomplete, Deferred, and Complete - Pending R are excluded by changing the Operator to not in. [Display Order - 40] Displays the Shop in the 5th column. Select the shop desired for the search. In this example, Electrical is the shop search. ![]()
![]()
![]()
![]() |
In addition to the ability to set the column Display Order using numbers in the designated fields, another part of the Display Order feature includes the ability to select between Ascending (Asc) or Descending (Dsc). This will determine the order of the rows of a column. ![]() In the example below, the Status is set to be sorted in descending order, starting with “New.” ![]() |
Searching for a Work Order with the Value, 12345, this is the value used by the operator to determine if a record will be included in the query results or not. ![]() |
Here (screenshot) is a standard list of Operators that can be applied to most rows of your search criteria. The selected operator applies to the value entered in the column after it. ![]() The logical operators (=, >, <, >=, <=, <>) work as expected. Starts with and Ends with work by looking for the value at the beginning or end of a value entry. Contains just looks for the value anywhere in the data element. In and not in asks for records where a specified data element is either in or not in them. |
The operators for Edit Date (screenshot below) ask the query to pull records that meet the specified date criteria. Operators unique to date criteria include: Between, Older than, Last, Within, Next and Newer than ![]() |
With some data elements, you can look to see if the element is empty (Null) or has something/anything in it (Not Null). ![]() Referencing the screenshot above, Null would return all projects in a Phase that does not have the Project filled in. Do not type in the search field, it must be blank. Not null only returns records with populated Problem Codes. The search field can be left blank to return all records that have anything entered for the Problem Code, or when specified in the field, returns only records that have been entered. |
The column search qualifier is one of the more powerful operators that compares two different databases. A column operator could be set to a column search qualifier (e.g., = column, > column, < column, >= column). When that happens, the compare to column options become available. ![]() Examples: My Total Estimate is = to my actual total (the = populated an additional column with selection choices) as a comparison. Show me all Work Orders when my Estimated Total is less than My Actual (You are looking for an overrun estimate). In the example below, from the work order search screen, phase costs section, selecting the >column operator for Actual Total searches for all phases where the Actual Cost has exceeded the Estimated cost opens a list of other common fields for comparison. In this case, Estimated Total. ![]() Below, you will see the Cost Analysis for the Phase. If you had multiple Work Orders, the cost analysis of this would level up on this phase. ![]() ![]() |
Below, the user operator returns all records created by whoever is logged in at the time. ![]() User defined fields create additional customized reporting and management capabilities. |
The in and not in operators allow you to specify one or more values to include or exclude.
![]() The search qualifier, between. The fields must be within the listed range (date and numeric fields only). ![]() Below are two example settings for search qualifiers newer than or older than.
![]() Below are two example settings for search qualifiers last or next
![]() The field must be within the listed time frame, within 1 day from the current date. ![]() ![]() ![]() ![]() ![]() ![]() |
Table Headers (other than the Primary/top Table) can also have a drop down menu of operators. The example below shows the Notes Log header operators. ![]() Select - This is the default value. With Select, any criteria selected from this section acts just like the criteria in the Primary Table. Not Exists - The only records returned will be those where there is no record from this subordinate table. For example, when searching for Work Orders and you select Not Exists for the Notes Log, you will get Work Orders that don’t have any notes. Exists - This is the opposite of Not Exists. So, for the example above, the search will return any Work Orders that have a Notes Log record. Match All - With Match All selected, only records where all the records on this subordinate table are selected will be returned. An example of this would be for a Work Order query where the Phase is set to Match All and a Shop is selected. The only Work Orders returned will be ones where ALL the Phases have a specific shop. |
|
Now that you have studied all of the materials above, here is a video by AssetWorks to help you tie everything together.
AiM IQ - 100 - What is a Query - 4.mp4In this tutorial, we covered what a search query is, the anatomy of a query screen and its parts. The table below summarizes the above material. Refer back to the tutorial above for specifics.
|