TableLookup

You can use this function for Optiva Workflows, Copy Methods, and Equations.

Purpose

Execute a SQL Query with the supplied parameters. Returns the value from the first row and column of an array from the query. The object is a valid data type for the function.

The TableLookup function uses the same standard name query arguments as described for TableLookupEx and TableReader.

This function is best for a quick single value answer.

Syntax


Dim variable As Object = TableLookup(QueryName[, paramN])

Arguments

Part Description
QueryName Name of the query in FSQUERY to be executed. The tokens are replaced in the SQL by the system for these names:
  • [%USER]
  • [%LAB]
  • [%GROUP]
  • [%%CURRENT_DB_NAME]
  • [%%SEARCHTABLE] - This token is only available during the Search's PostSearch event.
paramN Optional. The parameters can be in the form of an array or a comma-delimited string of the individual arguments of the query.

Examples


Dim rv As Object
TableLookup("MyCustomQueryCode",arg1, arg2, arg3…)

or


Dim argArray As Object = array(arg1, arg2, arg3)
Dim rv As Object = TableLookup("MyCustomQueryCode", argArray)