Visual Query conditions
You can constrain a search according to the properties and metadata of records in the Information Store by adding conditions to the Visual Query. You can add conditions to any of the items in a query structure.
A query condition is made up of a property or metadata type, an operator, and one or more values. The number of values depends on the operator that you choose.
- If your query structure consists of a single Person type, you can narrow the focus to search for all people with the given name John and family name Doe.
- By adding query conditions to more than one query item, you can find people called John Doe who own a car with a license plate that starts ABC.
- By adding a count to a query structure, then entering a value of 2 for the count as part of the conditions, you can find people who own at least two cars.
- By adding a condition to return records with notes that contain a particular string, you can identify more records that might be relevant to your analysis.
- By specifying characteristics that are described by a link between two accounts, you can identify accounts that are involved in high value transactions, such as links that represent transactions of value greater than $75000.
When you add conditions to a query, the first step is to select the query item, then the property or metadata type within that query item for which you want to add conditions. After you select the type, several operators are available to use. For example, 'Between', 'Is exactly', 'Is not,' 'Matches wildcard pattern'. The 'Between' operator is inclusive (it includes the values that you enter). Not all operators are available for all types, for example you can only select 'Is exactly' or 'Is not' for record identifiers.
- Aspects of date and time types
- Use of wildcards
- Multiple values in a single condition
- Whether all conditions have to be met (AND), or just one of the conditions must be met (OR), or a combination of both
Date and time types
For types that store date, time, or date and time values, you can create conditions such as 'Date of Birth equal to 15 Mar 1966' or 'Date first uploaded later than 01 Jan 2018'. However, you can also add conditions that use aspects of such values, which allow you to search for transactions that were made on any Monday, or dates of birth that are 1 Jan in any year.
When you create a date and time condition, you must choose an aspect to use. For example, Date of Birth might appear in the Add Condition window several times with different aspects: Date of Birth » Date, Date of Birth » Day of Week, Date of Birth » Month.
If you specify a time as part of a condition, you can choose how to deal with time zones. The choice that you make affects the search that takes place. When you select a time zone, all times are converted to that zone for comparison, so a time of 1pm GMT matches 8am EST. If you decide to ignore time zones, times are compared literally, so that a time of 1pm GMT matches 1pm EST, as well as 1pm in any other time zone.
Wildcards
If the value is a string, the 'Matches wildcard pattern' operator is available. The following wildcards are supported:
? | Matches a single unknown character. For example, J?n matches Jan and Jon but not Jean. |
* | Matches zero or more unknown characters. For example, J*n matches Jn, Jan, Jon, and Jean. |
Multiple values
By default, each line in the value of a condition is treated as a single value, including any spaces and wildcards. If the value is a string and you select 'Is exactly' or 'Is not' as the operator, you can enter several values. You can include more than one value by entering each value on a separate line. If a text file contains the values that you want to use, you can import values from the file. Any file that you use must have the file type .txt and must contain row-separated values.
Combining conditions
After you create one condition, you can add another that uses the same type, or create another on a different type or a different query item.
- On the Person entity, Family Name is exactly Young.
- On the Vehicle entity, License Plate contains 123.
Typically, when you add conditions on different types of the same query item, all of the conditions must be met (AND). However, it can depend on the type.
If you add more than one condition on a single type, how the conditions are combined depends on the type, the operators that you choose, and the order in which you add the conditions. After you add a condition, the query indicates how the conditions will be combined (AND or OR).
If you specify multiple values for a single condition, at least one of the values must be met (OR).