get_Variable method

The get_Variable method gets the value of a referenced variable by using the ID (name) of the variable. You can use this method to pass the value of a named variable to an action for further processing.

.NET only: For VBScript, use Variable property instead.
If the specified variable does not exist in the runtime object, but does exist in the associated setup node object, the get_Variable method returns the value from the setup node.

A number of variables are defined and installed with Datacap. For a listing of these variables, see the Standard Variable Reference in IBM® Knowledge Center for Datacap.

Syntax

C#
string get_Variable(string lpszName)

Arguments

lpszName
The name of the variable of which you need the value.

Applies to

All objects.

C# example

This example gets the value of the Company variable.
string CompanyName = m_oDCO.get_Variable("Company")