Access Keys:
Skip to content (Access Key - 0)

Searching in RT Using Query Builder

The Query Builder feature in RT is a comprehensive search tool that lets you construct and modify searches, save searches, and share saved searches with other RT users.

This guide covers how to use Query Builder:

  • Overview of searching
  • Constructing a search
    • Guidelines for combining search criteria
    • Creating your search criteria
    • Searching on date fields
    • Running the search
  • More options
    • Modifying search criteria
    • Formatting search results
    • Saving searches
    • Using saved searches
    • Deleting saved searches

Overview of searching

The basic steps for creating and running a query are:

  1. Click on Tickets > New Search to get to Query Builder.
  2. Choose your search criteria.

Constructing searches

You can create simple or complex searches and specify any of the RT ticket fields, including any custom fields you use. You can also specify the use of "and" or "or" to combine search terms.

Guidelines for building a search

Bear in mind the following:

  • The more terms you use, the narrower your results will be.
  • Combining terms with "and" means the results have to meet both terms; combining with "or" means results only need to meet one or the other term.
  • You can use both "and" and "or" in one search query but make sure the syntax is correct. For example, if you want to find tickets that have the status of either New or Open and were submitted by jdoe, the syntax needs to be (New or Open) and jdoe, not New or Open and jdoe.

Creating search criteria

  1. Go to Ticket Search > New Query.
    Result: The Query Builder screen displays:
    search screen

    Example of the default Ticket Search screen.

    If your queue contains custom fields, they will appear in the Add Criteria section.
    The four areas, Add Criteria, Query, Display Columns and Saved Searches can be collapsed or expanded by clicking on the X to the left of the title.
    If you previously clicked your queue name under Quick Search on the Home page, you'll see search criteria already entered Query Untitled Search area.

  2. Use the dropdown lists and text boxes under Add Criteria to construct your search. For a complete list of the default fields and the corresponding dropdown list, go to the List of RT Ticket Fields.
    1. Specify the field(s) and value(s) you want to use in your search. If you want to fine tune the search (i.e., add and remove items) click Add then use the Query area to modify your search.
      Note: If your queue uses custom fields, first choose your Queue from the dropdown list, then click Add in order to see your custom fields display.
    2. If your search criteria requires the use of both and and or click on Advanced, modify the search logic, then click Apply.

Searching on date fields

Date fields can be searched in various ways. To search on a specific date, the common date formats are recognized:

  • MM/DD/YYYY (e.g. 10/25/2006)
  • MM/DD/YY (e.g. 10/25/06)
  • MM/DD (e.g. 10/25) - assumes current year
  • DD-Mon-YY (e.g. 10-Oct-06)
  • DD-Mon (e.g. 10-Oct) - assumes current year

In addition, relative date and time searches are supported:

  • today
  • yesterday
  • 3 days ago
  • -3 days (same as 3 days ago)
  • 4 hours ago

Examples of Date Search Criteria

  • To find tickets created before September 1, 2006, use the criterion: Created | Before | 9/1/2006
  • To find tickets created today: Created | On | today
  • To find tickets updated in the last four days: Last Updated | After | 4 days ago

Running the search

Run the search by clicking the Search button.

Result: The results display in a list with a default set of columns. With the results you can do the following:

  • Make bulk updates by clicking on the Update Multiple Tickets link at the bottom of the results list.
  • Export the results to an Excel spreadsheet by clicking on the Spreadsheet link at the bottom of the list.

More options

Modifying search criteria

Use the Query area to modify your search by selecting portions of your criteria and clicking on a button:

Button Purpose
up button Moves selected line above preceding line
down button Moves selected line below the following line
left button Moves selected criteria to the left
right button Moves selected criteria to the right
delete button Delete selected text
clear button Clear the Query window
and or button Change the selected "and" or "or" to the opposite

Formatting search criteria

Before running a search, you can modify the columns that display:

Technique Procedure
Add columns Click the column name in the Available columns list, then click on the button.
Result: The column displays in the Show Columns list.
Removing columns Click on the column name in the Show Columns list, then click Delete.
Re-ordering columns Click the column that you want to move up or down, then click either the up button or down button button to move it.
Changing rows per page in the results Enter the desired number of Rows per Page box.

Saving searches

You can save the searches you've created for your own use, or share it with other groups.

After you've constructed your search,

  1. If you want to share the search with others, from the My Saved Searches dropdown list, choose the group with which you want to share.
  2. In the Description box, enter a meaningful name.
  3. Click Save.
    Result: Your search is saved and available as a link on the Home page under Saved Searches>My Searches and also under the Load Saved Searches section of Query Builder.

Using Saved Searches

You can use searches you've created and saved as well as searches others have created and made available to your group.
On the RT Home page, click on the search you want to run under the Saved Searches>My Searches section.

Deleting Saved Searches

  1. Load the search by choosing it from the Load Saved Searches, dropdown list, then clicking Load.
    Result: The search name displays in the Description box and the Delete button displays.
  2. Click Delete.
    Result: The search is removed from the list.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

July 14, 2017

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
search search Delete
rt rt Delete
query query Delete
builder builder Delete
c-rt-search c-rt-search Delete
c-rt-user c-rt-user Delete
c-rt-enduser-search c-rt-enduser-search Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki