Progress
Report Builder
User’s Guide


LOOKUP

Returns an integer that provides the position of an expression in a list. Returns a 0 if the expression is not in the list.

SYNTAX

LOOKUP ( expression , list [ , character ] ) 

expression

A constant, field name, or expression that results in a character value that you want to look up within a list of character expressions. If the value of expression is unknown (?), the result of the LOOKUP function is unknown. If expression contains a delimiter, LOOKUP returns the beginning of a series of entries in list. For example, LOOKUP(“a,b,c”,“x,a,b,c”) returns a 2.

list

A list of character expressions (constants, field names or expressions that result in a character value) that contains the expression you name with the expression argument. Separate each entry in list with a delimiter. The default is a comma (,). If list is the unknown value (?), the result of LOOKUP is the unknown value.

character

A delimiter you define for the list. The default is a comma (,). This allows the function to operate on a noncomma-separated list.

EXAMPLE

To look up the states in the northeastern United States in the Customer table, create a calculated field containing this expression:

LOOKUP(State, "MA,RI,CT,VT,ME,NH") 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095