In the expression editor, the Static tab inserts fixed values into an expression: numbers, texts, colors, or true and false. Unlike variables and values of elements, they never change by themselves. How to open the expression editor is explained in Use the expression editor.
You find the Static tab in the visual view of the expression editor. When you click a block with a fixed value there, it opens by itself. At the top you choose the kind of value, below it you enter the value. Update applies it.
Kinds of fixed values
- Number: a number, for example
20or1.5. - String: a text, for example
Special offer. Colors are text too: a hex code like#0050ff. - Boolean: true or false. You set it with a switch. Switched on means
true. - Object: several named values in curly brackets, for example
{ x: 10, y: 20 }. You only need this for advanced expressions.
To turn a number into a text or the other way round, choose the new kind at the top and enter the value there again. Update then replaces the previous value.
Fixed values as code
In the code view of the expression editor, you type fixed values directly:
- Numbers without anything around them:
20,1.5. - Text and colors in backticks:
`Special offer`,`#0050ff`. - True and false as
trueandfalse.
For example, in text1.bottom + 20 the 20 is a fixed value. In IF(isMember, `Member`, `Guest`) both labels are fixed texts.