SetGlobalVar
Set the value for a global variable
Signature
public void SetGlobalVar(string varName, object value, bool persisted = true)
Parameters
varName
string required
The string name of the global variable
value
object required
No description provided.
persisted
bool
Default:
True
To get, set, or unset persisted global variables, set to true or leave empty.
To get, set, or unset temporary/non-persisted global variables, set to false.
Return Type
void
Example
using System;
public class CPHInline
{
public bool Execute()
{
string value = "This is saved to a global variable";
//Examples on usage
//Save to a persisted global variable called "myString"
CPH.SetGlobalVar("myString", value, true);
//Save to a non-persisted global variable called "myString"
CPH.SetGlobalVar("myString", value, false);
return true;
}
}