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.

By adding query conditions, you can look for records with specific values or ranges of values in their properties; and you can also involve metadata such as record identifiers or date of upload. You can narrow the focus of the search by gradually adding more conditions, increasing the complexity of the query. For example:
  • 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.

When you add conditions to property and metadata types, there are several things to consider:
  • 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.

  • If you specify conditions on different items in a query structure, the conditions on the different query items must all be met (AND). For example, if the structure of your query contains a Person entity that is linked to a Vehicle entity, you might specify the following conditions:
    • On the Person entity, Family Name is exactly Young.
    • On the Vehicle entity, License Plate contains 123.
    The query results then contain people with the family name Young who are linked to a vehicle whose license plate contains 123.
  • If you add conditions involving different property or metadata types to the same query item, all of the conditions must be met (AND). On a Vehicle query entity, if you specify that License Plate contains 123 and Color is exactly Black, then the query returns only vehicles that meet both of those conditions.
  • If you add several conditions involving the same property or metadata type to the same query item, then how the conditions are combined depends on the operators that you choose.

    For example, if the same query item has Color is exactly Black and Color is exactly Blue, then vehicles are returned when either of those conditions is met (OR). However, if those conditions are Color is not Red and Color is not Green, then vehicles are returned only when both conditions are met (AND).

    When you add conditions like these to query items, the editor displays AND or OR above the operator name to indicate how they'll be evaluated. Regardless of the order they appear, ORed conditions involving the same property or metadata type on the same query item are always evaluated together.

  • If you specify multiple values for a single condition, at least one of the values must be met (OR).