Insert a variable
Variable mode
You insert and use existing system and user-defined variables in field values across an environment’s Settings and Rules tabs with variable mode. You can use variable mode in open fields, toggles, and dropdowns, except in read-only configurations. Supported variable types include boolean, strings, integers, and floats.
When you update a variable’s value, it updates everywhere the variable is referenced. To apply changes, activate any affected draft environment versions.
Example
If you have a variable CACHE_TTL with a value of 3600, you can reference it in a cache TTL behavior. To change the value, update CACHE_TTL in the Variables tab and activate a new environment version.
Variable mode only works with existing variables. To add a new user-defined variable to your workspace, follow the steps in Add a variable.
How to
To use variable mode:
- In the Settings or Rules tab, select a rule and click Use variables to enable variable mode.
- Click the field where you want to use the variable to open the Select variable menu.
- Search for the system or user-defined variable you want to use.
- Click Exit variable mode when finished.
- Once you're ready with all updates, click the global Save at the top of the page.
Expression Mode
Expression mode provides more granular control, allowing you to use multiple variables and operators in open fields.
To use expression mode:
- Enable variable mode.
- Click an open text entry field to launch the expression mode.
- Enter your expression using variables and operators.
- Click Exit expression mode when finished.
- Once you're ready with all updates, click the global Save at the top of the page.
Updated 5 months ago
