Insert Scripting System Variables

Most Invantive software products support Invantive Script variables in addition to Invantive SQL. Script variables allow client-side definition of variable names and values. For example:

local define NAME "My Value"

After defining a scripting variable, the value can be used anywhere with lexicographic replacement, such as:

select ${COLUMN_NAME}
,      '${SOME_VALUE}'
from   ${TABLE_NAME}

A large number of pre-defined system variables are available which enable a script to interrogate the environment running the Invantive software product. For example, the scripting variable ‘system:userdocumentsdirectory’ evaluates to the folder containing the user’s documents:


Invantive Control for Excel and Invantive Composition for Word offer an additional range of pre-defined system variables to inspect the Excel and Word environment.

Both on Excel and Word, the pre-defined system variables can be inserted using the wizard in the query definition tab of the model editor.

The Invantive Query Tool lacked these features. Starting 20.0.37 and 20.1.51, all available pre-defined scripting parameters can be found in the Scripting menu available in the context menu of the source code editor:

A click on a pre-defined scripting variable inserts the necessary code at the cursor position.