Comparing one list to another fails

Comparing one list to another fails

  1. LIST1 = ("cat", "dog", "bird", "fish");
  2. LIST2 = ("cat", "dog");

  3. for each element in LIST1
  4. {
  5.     if (element not in LIST2)
  6.     {
  7. // do something
  8.     }
  9.    
  10. }
Gives an error "Left expression should be a field name for 'not in' operator". REALLY?

The help section (https://help.creator.zoho.com/Operators.html#List_Operators) states that

The List Operator not in checks whether a value is not within a set of values

Syntax

 

<expression1> not in <expression2>

where, the right expression should be of type "List"



John M. Whitney