Conditions on the trigger or the action?


#1

1) Give a description of the problem
Does it matter where you place the conditions. Specifically, is it better to test the condition in the trigger or in the action?

2) What is the expected behaviour?
Does it even matter?

3) What is happening/not happening?
It seems to work fine in either place, so I’m really just curious.

4) Post a Green Snapshot of the pistonimage


5) Attach logs after turning logging level to Full
No logs needed.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

It should work the same way. I’d use the second option if I needed more evaluation of conditions down the line.


#3

I agree with @eibyer. I tend to indent conditions underneath the trigger since it allows for more complex logic.