Skip to main content

Variable placeholder syntax

The syntax {variable:...} is a custom way to display variable values and apply functions to them. The variable ID value is a unique identifier for each variable. To use this syntax, replace the ... with the variable ID value. For example, {variable:1002} refers to a variable with an ID of 1002.

Functions

Here are some functions that can be used with {variable:...} syntax:

add(value)

Adds the specified value to the variable value.

{variable:1002:add(2)} adds 2 to the variable value.

multiply(value)

Multiplies the variable value by the specified value.

{variable:1002:multiply(0.5)} multiplies the variable value by 0.5.

round(decimalPlaces)

Rounds the variable value to the specified number of decimal places.

{variable:1002:round(2)} rounds the variable value to two decimal places.

true(text)

Returns custom text when the variable value is true.

{variable:1002:true(Yes!)} returns "Yes!" when the variable value is true.

false(text)

Returns custom text when the variable value is false.

{variable:1002:false(No)} returns "No" when the variable value is false.

Combine functions

It is also combine multiple functions like this: {variable:1002:add(2) multiply(0.5)}. This adds 2 to the variable value and then multiplies the result by 0.5.