Comment on page
A global value set at a workflow level
Global Variables are powerful tools used to dynamically customize a workflow's results. Global Variables can be strings, numbers, dates, boolean values and more. They can also be based off of variables in tables/columns in your workflow.
Every workflow has access to the following global variables:
To create your own global variable simply click on the plus circle in the top right corner of your canvas and fill out the form. Once the variable is created, apply it to your workflow by including it in a formula in either the Filter or Edit Columns tools. Global Variables will show up in the expression builder with the format
Create a global variable and use the expression builder in the Filter tool it to limit your data based on that variable.
If a global variable is used in a tool in the Canvas tab, it can also be applied in your Data App. When crafting a story in your Data App, you can use global variables to provide different views of your data.
There are two ways in which Global Variables can be used in a Cascade workflow: in the Expression Builder and through Templating.
Global Variables can be used in the expression builder to create dynamic formulas. Simply start to type your Global Variable name into your formula and it will show up as a selectable option with the
Global Variables can also be used in your workflow outside of the Expression Builder. This is through Cascade's Templating tool. There are many different ways to use templating throughout Cascade workflows, so we'll walk through each one here.
Templating can be used to create Dynamic URLs in the following import tools:
Simply replace the section of your URL you would like to be dynamic with your variable in the templating format. For example, if I wanted to import Baseball data that all had the same URLs with the exception of the name of the file (i.e. Batting, Pitching, etc), I could take this URL:
and convert it to:
This new URL variable would allow me to dynamically change the file I wanted to import based on my global variable value.
Other tools within Cascade Workflows also allow you use Templating while working with your data.
Use Templating to Find and Replace Global Variables
For each of these workflows Global Variables can be used in any of the available text boxes. Use Templating to dynamically replace values, name or describe validations, or even label chart axes.
Templating can also be used in multiple parts of Dynamic Workflows. Use Global Variables in 'Add Dynamic Input' or 'Add Dynamic Output' to dynamically name or describe both inputs and outputs in the workflow canvas.
Create a Global Variable in your Dynamic Workflow to use as an input when using that Dynamic Workflow in other Workflows
Then, when linking to your Dynamic Workflow in other workflows (see above example with "Crypto Avgs"), your original global variable will become an input to your new reference tool.