Examples of advanced search bar statements
The statements in the following examples illustrate ways you can use the advanced search bar to build complex searches.
Finding all requests that were created by someone other than the current user
'Submitter' != $USER$
This example uses the not equal to operator (!= ) to find instances where the value in the Submitter field is not equal to the user who is currently logged in. Notice the use of the
Finding all requests that were created after 10:00 a.m. on the current day
'Create date' > "10:00:00"
The example uses the greater than operator (> ) to find requests where the value of the Create date field is greater than the current day at 10:00 a.m.
Finding all requests that have been created for any problem that involves printing
'Submitted Problem Type' LIKE "%print%"
The example uses the LIKE operator to perform a pattern search that finds requests with the word print anywhere in the Submitted Problem Type field.
Finding all requests with a status of released
'Status ' = "Released"
Notice the spaces after the word Status in the field specification. The spaces exist in the field label on the form being used. If you use the Field List dialog box by selecting the Fields button on the advanced search bar, the spaces (and single quotation marks) are added automatically.
A search statement that includes a not equal to operator (!= ) might return unexpected results because the advanced search bar complies with ANSI SQL standards. One of these standards distinguishes between fields that contain data and fields that have never contained data.
For example, the following statement does not return requests where
CharacterField is empty:
'CharacterField' != "one"
To include requests where
CharacterField is empty, enter the search statement like this:
'CharacterField' != "one" OR 'CharacterField' = $NULL$