All features in the input are divided into two sets: a selected set and an unselected set. At the start of the operation, all features are selected. You must use an INFO query to identify the features for the final selected set.
An INFO query is a list of one or more query actions, each of which must take one of these forms:
- RESELECT <logical expression>
Removes from the selected set those features or records that do not pass the logical expression
- ASELECT <logical expression>
Adds to the selected set those features that do pass the selection
- NSELECT
Swaps the selected set with the unselected set
A logical expression is composed of one or more simple expressions joined by logical connectors.
Supported logical connectors:
Connector | Description |
---|---|
AND or & | Operate only on those features or records which pass the simple expressions on both sides of the AND. |
OR or| | Operate on those features or records which pass the simple expression on either side of the OR, or on both sides. |
XOR | Operate only on those features or records which pass the simple expression on one side of the XOR, but not the other. |
A simple expression takes the following form: <operand_1> <logical operator> <operand_2>
Operands include the following:
- The name of an item (field) in an INFO table
For example: LENGTH
- A constant numerical value
For example: 237.5
- A character string in single quotes
For example: 'Riparian'
- A value set
A value set is enclosed in { } brackets. Each entry in the set is separated by a comma. An entry can denote a range of values using -> to separate the end values of the range. Entries can be numerical constants or character strings. A range defined between two character strings is based on the ASCII number sequence, which is alphabetical. Up to 20 entries can be specified in a value set, for example, {1,2,7->9,12}.
Logical operators:
Operator | Description |
---|---|
EQ or = | Operand_1 is equal to operand_2. |
NE or <> or ^= | Operand_1 is not equal to operand_2. |
GE or >= | Operand_1 is greater than or equal to operand_2. |
LE or <= | Operand_1 is less than or equal to operand_2. |
GT or > | Operand_1 is greater than operand_2. |
LT or < | Operand_1 is less than operand_2. |
CN | Operand_1 contains operand_2. Both operands must be character operands. |
NC | Operand_1 does not contain operand_2. Both operands must be character operands. |
LK | Operand_1 is like the wildcard character string specified in operand_2. The wildcard character is *. It is used to represent characters of any string length. For example, LK 'M*' will match MAIN, M1, M.1, or any other string beginning with the letter M. To match a string containing an *, use '^*' in the operand. Thus, the operand 'M*^*' matches any string beginning with M and ending with *. |
IN | Operand_1 is contained in the set of numeric constants or character strings specified in operand_2. For this operator, operand_2 must be a value set of character strings or constants. |
Operations are performed in sequence from left to right. Parentheses can be used to specify that the logic within the parentheses be performed first. In the case of nested parentheses, the innermost operations are performed first.
Each element (operands, operators, connectors, and parentheses) must be separated by blanks.
Arithmetic expressions are allowed within simple expressions.
Here is an example of an INFO query that could be used in Python: ["RESELECT habitat = 'riparian1' AND area >= 100", "ASELECT status cn 'checked' "]. To use this query in a tool dialog, follow the steps below to enter RESELECT habitat = 'riparian1' AND area >= 100 as one entry in the list, and ASELECT status cn 'checked' as another.
- Enter a query action into the INFO Expression field. Each query action starts with RESELECT, ASELECT, or NSELECT.
- Click the Add button to add the query action to the list.
- Repeat steps 1 and 2 until the complete INFO query has been entered into the list.
- If needed, use the Up and Down arrows to reorder the query actions in the list.