The filters in the iQ tool can compare the data in selected fields with values in several different ways when testing to see which records should be included in a query. When adding or editing a filter, the Compare field will automatically display only those options which make sense relative to the kind of data that is stored in the field being used in the filter. Equal To/Not Equal To — These options should be selected if you want to include only those records in which the value in the field matches the specified value exactly (or in the case of Not Equal To, if you want to include everything EXCEPT those records that match).

The Equal To comparison. Note the single Value field. Like/Not Like — These options are only available for those fields which store text values not including fields where a text value is selected from a drop down list. The Like option and its opposite, Not Like, allow the use of wildcards (symbols that stand for and define the parameters of certain unspecified characters in a search) in defining the values to be included. This contrasts with the Equal To/Not Equal To options which do not allow wildcards but require an exact match for the data in the field. (For example, using Equal To, a search for the word sample in a field would not find any records where the text in the field says samples since they are not an exact match, but using Like sample%; would include any text beginning with sample, including samples.) The Like option will probably be the most commonly used option for searches in text fields. Below is a table of wildcards that are available for use in the Like/Not Like comparisons in the iQ tool.

Wildcards:

%

Any string of characters and/or numbers of any length can take the place of the symbol. (The familiar * wildcard is NOT used.)

For example: can%; means any text starting with can;. % node%; means any text with node; somewhere in it.

_ (underscore)

— Any single character or digit can take the place of the underscore character.

For example: _ ow; means any text with three characters, the last two of which must be ow;.

[ ]

— Any single character within the range or set of characters specified between the brackets.

For example: [a-h] ow; means any text with three characters, the last two of which must be ; ow; and the first of which can be any character between a and h. [ bchn] ow; means any text with three characters, the last two of which must be ow; and the first of which can be b, c, h or n.

Negation — means NOT. Use within the [ ] to exclude certain characters and allow any others.

For example: [^a-h] ow; means any text with three characters, the last two of which must be ; ow; and the first of which CANNOT be any character between a and h.

These wildcards can be used in combination with each other to form a very specific set of rules that will help you find the records that contain the text you are looking for. For example, [a-h]_ w%; means any text of at least three characters in length that starts with a letter between a and h, which is followed by any other character and then has a w as the third character. Less Than/Less Than or Equal To/Greater Than/Greater Than or Equal To — These options are only available for those fields in which a numeric value is stored. Use of one of these options will include those records in which the specified field holds a value that meets the mathematical relationship specified relative to the indicated value. If you want to exclude only the records that meet that relationship (in other words put a NOT in front of the option), simply choose the option that describes what would be left after the exclusion. For example, rather than Not Less than; (which doesn't exist), choose Greater Than or Equal To,; which means the same thing. Before/On or Before/After/On or After — These options are only available for those fields in which a date value is stored. The meaning of each of these selections relative to a date is intuitive. If you want to exclude only the records that meet that relationship (in other words put a NOT in front of the option), simply choose the option that describes what would be left after the exclusion. For example, rather than Not Before; (which doesn't exist), choose On or After,; which means the same thing. To perform a before; or similar search for a range of text values alphabetically, use a Like comparison. (For example, doing a Like comparison on a text field for [ A-M]%; will return all of the records with values in the text field that come alphabetically before words starting with N.) Between — This option is only available for fields that hold numeric values and dates. Use this option to specify a range of values that will be accepted. When you have selected this comparison option, two Value fields appear. The first field is for entering the value at the beginning of the range to be included. The second is for the last value in the range. This range is inclusive, meaning values that exactly match the values you enter as the boundaries of the range will also be included. It is important to be aware of this because, for example, if you want to find all the records from a certain year in a date field, you will want to put the beginning date as January 1st of that year and the end date as December 31st of the same year — not January 1st of the next year. To perform a between; search for a range of text values alphabetically, use a Like comparison. (For example, doing a Like comparison on a text field for [ H-M]%; will return all of the records with values in the text field that begin with the letters H through M.)

The Between comparison with two Value fields. In — Use this option if you want to compare the field to a list of values which you provide. If the value in the field matches any one of the values in the list, the record will be included. The interface for entering the values for this option is a little different from the other comparison options. When you have selected this comparison option, a Value field and a Values field appear with two buttons between them: Add and Remove. To create the list, you enter each value in the Value field and then click the Add button. This will cause the value entered to be added to the list in the Values field. If you want to remove a value from the list, select it in the Values field and click Remove.

The In comparison with an interface to create a list of acceptable Values. Exists/Not Exists — Use these options to test whether any value has been entered in the field or not (whether the field is blank or not). If there is a value in the field, it exists.; Selecting the Exists option will include all records in which there is some value (any value) in the field, while selecting the Not Exists option will include only those records in which no value has been entered in the field. You will not be required to enter a value for comparison if you select this option (since none is needed).

Contact Us

Research Informatics Director
Andrew Post, MD, PhD
Andrew.Post@hci.utah.edu
801-585-0600

Research Informatics Associate Director
Shirleen Hewitt, DBA
Shirleen.Hewitt@hci.utah.edu
801-585-5972

Governance

HCI Senior Director Oversight
Aik Choon Tan, PhD

Faculty Advisory Committee Chair
Aik Choon Tan, PhD

Faculty Advisory Committee Members
HCI Research Executive Committee