Skip to content

TableLookup

Look up data from tables or named ranges.

TableLookup(
    TableName,
    RowLookup="dynamicRowLookup",
    ColumnLookup=varName
)

Arguments

TableName
Name of the config table range. If this is a direct reference, it has to be in quotation marks (e.g. "t_Inputs").
RowLookup
Lookup string to determine the appropriate row index. Defaults to "dynamicRowLookup", which means that the string in the first cell of the table will be used to construct the lookup based on the properties of the projection node.
ColumnLookup
Lookup string to determine the appropriate column index. Defaults to the name of the variable that uses this function.

Examples

Dynamic row lookup

Look up values from "Column3" column in "Table2":

TableLookup("Table2",,"Column3")

With csvToTable

Read the funeral.csv file in the model-points folder for all policies with a duration larger than or equal to 12 months. Use the PolicyID variable as the row lookup and read in the "SumAssured" column.

TableLookup(
    csvToTable(
        ".\model-points\funeral.csv",
        "select PolicyID, SumAssured from df where PolicyDuration >= 12"
    ),
    PolicyID,
    "SumAssured"
)