Skip to main content

LOOKUPAINCREMENTAL

The LOOKUPAINCREMENTAL function is similar to the LOOKUPA function, with the key difference being that it works incrementally. This means that the function caches the result of each lookup so that the same value is not looked up multiple times, which can improve performance when dealing with large data sets.

The LOOKUPAINCREMENTAL function takes the same parameters as the LOOKUPA function: columnName, which is the name of the column to retrieve from the data source, from, which specifies the data source to retrieve the data from, and keyValues, which is a key/value object used to specify the conditions for retrieving data from the data source.

Syntax

object LOOKUPAINCREMENATL(string columnName, string from, params KVAL[] keyValues)
object LOOKUPAINCREMENTAL(string columnName, LFROM from, params KVAL[] keyValues)

Examples

Looking up a Company Name Incrementally

Suppose you want to retrieve the CompanyName from a data source incrementally based on a SupplierID. You can use the LOOKUPAINCREMENTAL function to accomplish this as shown below:

LOOKUPAINCREMENTAL("CompanyName", "Suppliers", KV("SupplierID", SupplierID))

In this example, the LOOKUPAINCREMENTAL function is used to retrieve the CompanyName from the Suppliers data source based on a SupplierID value. The function caches the result of each lookup so that the same value is not looked up multiple times, which can improve performance when dealing with large data sets.

Looking up a Contact Name Incrementally

Suppose you want to retrieve the ContactName from a data source incrementally based on a CustomerID. You can use the LOOKUPAINCREMENTAL function to accomplish this as shown below:

LOOKUPAINCREMENTAL("ContactName", FROM("Customers"), KV("CustomerID", CustomerID))

In this example, the LOOKUPAINCREMENTAL function is used to retrieve the ContactName from the Customers data source based on a CustomerID value. The FROM function is used to specify the data source to retrieve the data from. The function caches the result of each lookup so that the same value is not looked up multiple times, which can improve performance when dealing with large data sets.