A boolean variable can only be two values : true
or false
. Generally, such a variable is associated with a Checkbox field. It can be used with boolean properties inside the canvas, such as the visible
one.
To use a Boolean Variable, use the text ?myVariable
, with the name corresponding to the field defined.
"canvasFields": [ {"type":"rect", "visible": "?isDisplayed", "width": 330, "height":40, "left":5, "top":450, "fill":"#B1E29E", "stroke":"#000000"}, ]
What if you need to get the inverse result of the checkbox ? Then, you can add the code ?!isNot
to get the inverse result. If your checkbox isNot
is checked, it will return false
.