Conditional Field on Bricks
Last updated
Was this helpful?
Last updated
Was this helpful?
This advanced brick option decides whether that brick should run, or should not based on a condition.
The condition to run the brick is that the value must be true (or truthy) If the value is false (or falsy) this brick will not execute.
This condition can be any variable or expression or value, as long as they are truthy or falsy they will make it so that the brick will run, or not.
When building mods, it happens often that you want to debug your work. Sometimes there’s a brick that you don’t want to run, but at the same time you don’t want to fully delete it from the mod.
How can you prevent it from being triggered? If you want to “pause” a brick from running without deleting it you can set the Condition to 0
or false
.
Here are some examples of Condition you can set:
Setting these values to the Condition will run the brick:
1
true
“this is a string”
However, setting it to one of the below options will not run the brick:
0
false
{{ false if @input.url }}
You can provide a condition as one of the following:
Text: either a hard-coded value or a text template
Number: non-zero numbers are considered truthy
Toggle: toggling the brick on/off using a toggle
Variable: a variable from a preceding brick
For complicated business logic, you can use the , and pass the output to the condition using the variable entry mode.