IN Operator

Official Content
This documentation is valid for:

It is a logic operator that returns true if the left operand value is equal to some of the values enumerated in the right operand.


Att | Var | Property IN [(<comma-separated-constant-list>) | Collection | Array

Att IN Data Selector object

Collection refers to atributes or variables based on Collection Domains or variables defined as collection with the same data type of the left operand.


When the right operand is a list of constants delimited by comma, the IN operand is equivalent to the expression: LeftOperand = FirstConstant OR LeftOperand = SecondConstant ...

When the right operand is a Collection or Array, the working performance is similar to the previous one, but the list varies in the number of elements (Collection) between the different executions.

In the case of In DataSelectors see Data Selectors in For Each command

Associated specification messages and controls:

  • spc0075: Operand %1 does not match the data type of %2 in the IN comparison.
  • spc0076: %1 must be a collection to be used as the right operand in an IN comparison.
  • spc0077: %1's data type (%2) is not supported in an IN comparison.

Note: The IN with Collection or Array has not been rightly generated so far.


For &element in &Collection
If &element in &Collection
For Each
    where Attribute in &Collection
For Each
    where Attribute in DataSelector


Note that the first operand can only be an Attribute or Variable, not an expression (i.e "&numValue.ToString() IN &CharCollection " is not supported). 

See also

Implementing SDT collections
Collection variables
Data Selectors in For Each command

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.