Skip to content

getValueFromConfig

Return a value from a config table.

getValueFromConfig(
    TableName,
    RowLookup="dynamicRowLookup",
    ColumnLookup=varName,
    errIgnore=FALSE,
    valueOnError=0
)

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 is explained here.
ColumnLookup
Lookup string to determine the appropriate column index. Defaults to the name of the variable that uses this function.
errIgnore
Whether to ignore a missing column or row lookup. If FALSE, a runtime error will be raised for the missing lookup. The default is to raise an error for missing lookups.
valueOnError
The value to return if the column is missing.

Examples

To get the value of the Value1 column of the t_Values table:

getValueFromConfig("t_Values",,"Value1")

The result can be used inside other formulas:

10 * getValueFromConfig("t_Values",,"Value1") + 1

You can also use it multiple times in the same formula:

csvToTable(
    getValueFromConfig("t_PROPHET_TEXT_OUTPUT",,"Path"),
    getValueFromConfig("t_PROPHET_TEXT_OUTPUT",,"Query"),
    …
)

These formulas can get very long and unwieldy. They can be shortened by using runFromConfig and confValue.