1 Reply Latest reply: Nov 19, 2013 4:55 AM by Jonathan Dienst RSS

    Relate to lookup

    Agnivesh Kumar

      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.

        • Re: Relate to lookup
          Jonathan Dienst



          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


          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.