Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Relate to lookup

Lookup is  just like where condition in sql query in database .

Is this correct ?

so my question is that " Can we use and condition in lookup " just like in where condition in sql query.

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Lookup more similar to vlookup/hlookup in Excel than to a SQL where clause. The lookup conditions are expressed in terms of a match value and a field to search for the matchvalue.

From the manual

lookup(fieldname, matchfieldname, matchfieldvalue [, tablename])

Returns the value of fieldname corresponding to the first occurrence of the value matchfieldvalue in the field

matchfieldname.

Fieldname, matchfieldname and tablename must be given as strings (e.g. quoted literals).

The search order is load order unless the table is the result of complex operations such as joins, in which

case the order is not well defined.

Both fieldname and matchfieldname must be fields in the same table, specified by tablename. If tablename

is omitted the current table is assumed.

If no match is found, null is returned.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein