Logical and Comparison Operators

Logical (True or False, Boolean) and comparison operators allow you to combine the conditions you define on separate lines into complex statements. Alphanumeric rather than string comparisons are used when non-numeric (Greater Than, Less Than, Greater Than or Equal, Less Than or Equal) filter conditions are used.

True / False

True and False operators can be used to match a field expression with True or False values.

Value and Numeric columns are disabled when a True or False logical operator is selected.

AND

The AND function is typically used with numeric ranges. Use it if you want to select the records that pass all the conditions you defined; that is, a record is only selected if it passes each condition.

For example, suppose you have a field called AU containing gold values, and another field CU containing copper values. If you only want to work with the samples where the value is 10 g/t or higher for gold AND 10 ppm or higher for copper:

  1. Fill in the conditions as follows:
  2. AU >= 10

    CU >= 10

  1. Then select the AND operator under Combine Lines to indicate that both conditions have to be met.

OR

The OR function is typically used with character type fields, for example, you want all the drillholes with the prefix RC OR all the drillholes with the prefix BY to be included. Use the OR operator to select the records that pass any of the conditions. If a record passes any single one, several or all conditions, it will be selected.

For example, suppose you have a field called AU containing gold values, and another field CU containing copper values. If you want to select those records where the value is above 10 g/t for gold OR above 10 ppm for copper:

  1. Fill in the conditions as follows:
  2. AU > 10

    CU > 10

  1. Then select the OR operator under Combine Lines to indicate that either (or both) conditions are sufficient.

IN

The IN function takes at least two parameters, the first one is the value that gets compared. Other parameters are the values to compare to. If a match is found, the function returns logical TRUE.

In the following example, the IN function is used in a field expression to define a filter. If a record contains either 1, 2 or 3 in its BLOCK field, then the record passes the filter:

=IN([BLOCK], "1", "2", "3")

The IN function may also be used to check if a particular value is present in one or more fields:

=IN("VALUE", [FIELD1], [FIELD2], [FIELD3])

Equations

When you select the EQUATION option under Combine Lines , you can use the logical operators AND and OR in any combination.

For example, suppose you have a field called AU containing gold values, a field CU containing copper values and a field called TO containing depths. To select those records that have values above 10 (for either gold OR copper) AND that fall in the top 5 meters of the hole:

  1. Fill in the following conditions on the first three lines of the Filter Conditions section:
  2. AU >= 10

    CU >= 10

    TO <= 5

  1. Select the EQUATION option under Combine Lines.
  2. Enter the following in the Equation field: (1|2)&3

The conditions entered in lines 1 to 3 are combined according to the Equation.

The numbers in the equation refer to the lines you have specified as your filter (Field, Operator, Value) conditions. The pipe symbol '|' is used to denote the logical operator OR and an ampersand '&' is used to denote the logical operator AND.