Hi @dale ,
Thanks for asking!
The Global Variables feature does not yet fully work with the auto-complete (when you type {
character) or our pull-downs in the expression builder. There are a few ways to work around this for now.
Option 1: More Flexible but Not As User-Friendly
First, you can simply type the variable name from memory and not rely on the auto-complete. The auto-complete menu is a helper, but the interface will allow you to type anything you want (like {{custom.something}}
). In this case, you can just type {{global.var_name_here}}
to use the global variable in a text field.
If you need the global variable in an expression builder field, you can hold the SHIFT
key on your keyboard and press the new expression button. This will add a new single-text-field expression field, like this:
In the single-text-field expression field, the user interface will allow you to type anything you want with no error checking. You should use another field to determine the correct syntax:
In that example, I was testing for a variable equal to “Test”, which rendered email.subject == "Test"
.
You can then type that into the single-text-field expression field but change the variable name, like this:
Option 2: Less Flexible but More User-Friendly
If you want to use a global variable that was defined in a different rule, you can add a step like this as the first step of the subsequent rule:
When typing the variable name in the “Text to Render” field, you will need to type it from memory (it will not show up in the auto-complete).
Once you do this, each subsequent step in this rule will contain the global variable in the auto-complete and the expression builder:
This will only work for simple variables (strings), and will not work well for variables that contain complex objects (like an entire Autotask ticket, for example).