Specifications
Operators used in InfoMaker expressions
622 InfoMaker
IN and NOT IN
operators
Use IN to check if a value is in a set of values. Use NOT IN to check if a value
is not in a set of values.
For example, the following expression for the Background.Color property of
the Salary column displays salaries in red for employees in department 300 or
400 having a salary between $50,000 and $100,000, and displays all other
salaries in white:
If(dept_id IN (300,400) and salary BETWEEN 50000 AND
100000, RGB(255,0,0), RGB(255,255,255))
Comparing strings in InfoMaker expressions
When you compare strings, the comparison is case sensitive. Leading blanks
are significant, but trailing blanks are not.
Case-sensitivity
examples
Assume City1 is “Austin” and City2 is “AUSTIN”. Then:
City1=City2
returns false.
To compare strings regardless of case, use the
Upper or Lower function. For
example:
Upper(City1)=Upper(City2)
returns true.
For information about these functions, see “Using DataWindow expression
and InfoMaker functions” on page 629.
Blanks examples
Assume City1 is "Austin" and City2 is " Austin ". Then the expression:
City1=City2
returns false. InfoMaker removes the trailing blank before making the
comparison, but it does not remove the leading blank.
To prevent leading blanks from affecting a comparison, remove them with one
of the trim functions:
Trim or LeftTrim.
For example:
Trim(City1)=Trim(City2)
returns true.