Progress
Report Builder
User’s Guide
IN-LIST
Compares a given value with each item in a list of values to determine whether the value is included in the list. Report Builder compares the first value with each value in the list. If it does not find a match, IN-LIST returns 0. If it does find a match, it returns a number corresponding to the position of the value in the list (that is, 1 for the first value, 2 for the second value, etc.).
SYNTAX
value
A value (a constant, field name, or expression) that you want to look up within a list of values.
list-values
List of values Report Builder compares with the value. You must have at least one list-value in the value list.
NOTE
The value and all the list-values must be the same data type: CHARACTER, NUMERIC, DATE, or LOGICAL expressions. Also, if the same value appears twice in the list, Report Builder returns the position of the last (rightmost) matching value.
EXAMPLETo test each record in the Items table to determine whether its item code field (Item-num) is one of three items in a list, create a calculated field containing this expression:
Sample data:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |