"Break" Function to simplify triggers

Hey everyone, a quick trick I just learned myself!

When you have multiple triggers tied to one action, they execute in order until one trigger has a transition fire.

image

There are times where you want to use multiple triggers, but only execute earlier triggers given certain criteria. A common example is field validation for buttons which process data being inputted. Before learning this trick, I would use a “Can proceed” variable to control my triggers when I use multiple such as this trigger in “Show 1”

Then, inside of “Show 2” and “Show 3”, I would use a conditional statement to determine if I still needed to run that trigger.

image

However, a much simpler solution when you need to “break” from a group of triggers is to simply route to the current step. This will prevent all following triggers from executing, and there will be no noticeable difference to the user.

image

This trigger will end the string of triggers after showing message 1. No variables or additional triggers to worry about!

It is very valuable to separate triggers. This is a neat little trick which can make them slimmer and easier to understand!

3 Likes