If using variables in NiceLabel Automation actions, follow these recommendations.
Enclose variables in parentheses. If you have variables with spaces in their names and refer to variables in actions, such as Execute SQL Statement or Execute Script, enclose the variables in parentheses, as in
(Product Name). Also use parentheses if variable names are the same as reserved names, e.g. in the SQL Statement.
Place colon in front of the variable name. To refer to variables in Execute SQL Statement action or in Database Trigger, you have to place a colon (
:) in front of the variable name, such as
:(Product ID). The SQL parser understands it as 'variable value'.
SELECT * FROM MyTable WHERE ID = :(ProductID)
Convert values to integer for computation. If you want to execute a numeric calculation with variables, make sure that you convert variable values to integers. Defining variables to be numeric only limits the acceptable characters for defining the value, but doesn't change the variable type. NiceLabel Automation treats all variables of string type. In VBScript, you would use the function
Set default / start up values for scripts. When using variables in actions, make sure these variables have some default value assigned, or the script checking might fail. You can define default values in variable properties, or in a script (and remove them after testing the script).