# Lookup

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/conditional-functions/lookup
>
> Lookup returns a boolean telling whether a database table has a record matching column, operator and value conditions, including LIKE and NOT LIKE with %.

This Function returns a _\<boolean>_, which is the result of a search for a record in a Database, in compliance with the specified Conditions.

### Parameters

* **Table** _\<unquoted string_> - Table to perform the search on.
* **Column** _\<unquoted string> -_ Column where to verify the condition.
* **Operator** _\<unquoted string> -_ Operator to apply when verifying the condition. The Possible values for this parameter are:
  * < – Less than.
  * \> - Higher than.
  * <= - Less than or equal to.
  * \>= - Higher than or equal to.
  * \= - Equal to
  * <> - Different from.
  * LIKE - Like to. Use this operator to perform generic searches using character "%".
  * NOT LIKE - Not like to. Use this operator to perform generic searches using character "%".
* **Value** _\<string>_ or _\<numeric> -_ Value to compare the **Column** to. The type of this parameter depends on the database type of the **Column**.

### **Examples**

Consider the following database table "Products":

| Code | Name       | Stock |
| ---- | ---------- | ----- |
| 001  | Coca Cola  | 100   |
| 002  | Pepsi Cola | 200   |
| 003  | Pork Chops | 300   |

* _Example 1_

Lookup(Products, Stock, >, 100)\
**Result** = TRUE

* _Example 2_

Lookup(Products, Stock, >, 300)\
**Result** = FALSE

* _Example 3_

Lookup(Products, Stock, >, 100, Stock, < 300)\
**Result** = TRUE

* _Example 4_

Lookup(Products, Name, LIKE, "%Cola")\
**Result** = TRUE

* _Example 5_

Lookup(Products, Name, LIKE, "Cola%")\
**Result** = FALSE

* _Example 6_

Lookup(Products, Name, LIKE, "%Cola", Stock, >, 100)\
**Result** = TRUE

:::info
When you specify more than one condition, the operator used between the conditions is "AND". Therefore, something like "select (...) from (...) where (...) AND (...)" will be executed.
:::
