SetVariable function

The SetVariable function sets the value of a global variable that can be accessed by any script in the integration.

Syntax
SetVariable variable, value

Parameters
variable—A string parameter containing the name of the variable to set.

value—A variant containing the value that the variable will be set to.

Example
The following example is the Before Integration script for an integration. It reads a path value from the path.txt file, and uses that value to set the value of the Path variable.

'Read path information from the path.txt file.

Const ForReading = 1
Dim fso, f
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set f = fso.OpenTextFile(“C:\Program Files\Microsoft Dynamics\Integration 
Manager\path.txt”, ForReading, True)
FilePath = f.ReadLine
SetVariable “Path”, FilePath

Related items
ClearVariables function
GetVariable function

 


Documentation Feedback