Views:

Question:
How do you properly call a Global Variable in Workflow Designer when using VB Script or SQL statement.

Solution:
When using Global Variables, you must use the proper syntax. This will vary depending on the type of script you are using.

VB Script:
If you are trying to create a condition statement for example, this is written using VB Script. To use a variable, you do not need to use quotes around the actual variable name. It will automatically parse the variable name with double quotes. You do need quotes around the variable's literal string value but not around a numeric variable's value.

Below are 2 examples:

  • GV_Total_Amount > 1000.00
  • GV_Status = "Pending Approval"

SQL Script:
If you are trying to create a WHERE clause for a SQL statement in Workflow Designer with Global Variables, you will need to use single quotes to use the content of the variable as a string. See below for an example.

  • 'GV_Company_Name' = 'Peters Engineering'​​