Overview
The GILOOKUPF function returns the value of a column from a generic inquiry by specifying a Filter to be applied on the server and the Keys of the row to locate.
Syntax
This is the syntax for this function:
=GILOOKUPF(
ConnectionName,
Name,
Filter,
Column,
Key,
OtherKey1,
...
)
Arguments
This function has the following arguments:
|
Arguments |
Required/Optional |
Description |
|
|
Optional |
Provide one of the following values:
OR Omit the argument to return results for all compatible connections with default aggregation settings. |
|
|
Required |
The name of the generic inquiry. To search for generic inquiry names, use the Inquiry Title lookup on the Generic Inquiry page in Acumatica. Use only letters, numbers, spaces, hyphens ( |
|
|
Optional |
The condition that determines which records should be selected from the inquiry. The recommended way to construct this argument is by using the GIFILTER helper function. Otherwise, see the OData filter reference sheet. |
|
|
Required |
The name of the column from which the value will be returned. |
|
|
Required |
The values for every key column of the generic inquiry. Those will be used to locate the data row in the generic inquiry result set. |
|
|
Optional |
Second key used for filtering the data. |
|
... |
|
|
To query a generic inquiry that has parameters, provide a two-column range in the Name argument instead of the inquiry name. The range holds one row with the key giName and the inquiry name, and one row for each parameter with its name and value. Type giName exactly, with no spaces around it; otherwise, GILOOKUPF treats each cell of the range as a separate inquiry name. For details, see Generic inquiries with parameters in the GI article.
Example
=GILOOKUPF(
"Demo",
"VelixoReportsPro-Accounts",
C8,
"Description",
"10200"
)
Description: Cell C8 contains the filter =GIFILTER("Demo", "VelixoReportsPro-Accounts", "AccountCD", "1*"), which returns startswith(AccountCD, '1') eq true. Suppose the key for the VelixoReportsPro-Accounts generic inquiry is configured to be the AccountCD field. The above formula will then:
-
Fetch the accounts whose account code starts with 1 from the generic inquiry, applying the filter specified in the cell C8.
-
Retrieve the record where the value of the key column (AccountCD) is 10200.
-
Return the value of the Description field for this record.
Result:
Looking up a value from an inquiry with parameters and a filter
=GILOOKUPF(
"Demo",
A1:B2,
GIFILTER("Demo", "DB-StorageDetails", "InventoryID", "WIDGET*"),
"InventoryDescription",
"WIDGET01"
)
Description: Cells A1:B2 contain giName / DB-StorageDetails and Warehouse / VA-WHOLESL. With InventoryID configured as the key column, the formula loads the VA-WHOLESL items whose inventory ID starts with WIDGET and returns the description of item WIDGET01.
Result:
Additional Notes
For each Generic Inquiry that you use with the GILOOKUPF function, you will need to explicitly specify the inquiry's key columns in the Generic Inquiries Options section of the Velixo options window.
Key columns are configured per inquiry name. They apply to every call to that inquiry, including calls with other parameter values, calls without parameters, and GI calls. Choose key columns that are unique for every set of parameter values you use. Otherwise, the function returns The key columns of inquiry '<inquiry>' are not unique….