Yes but not through the UI which can’t handle complicated conditions like that.
You’ll need to create a Script Condition and write the code using your rules language of choice to determine whether to run. The last line executed by the script needs to evaluate to true or false.
Basically I well know Rule DSL but I am moving my first step into JS, but I need help on How can I return True or false, is there some example for both language? Thanks a lot
so if I well understand, last statement of the script must be an “IF” condition that return true or false.
So in my case I can evaluate all time and day of the week and the set a variable to evaluata at the end of the script.
Is this the right way?
In this last example there are two potential last lines of the rule depending on whether it’s a weekend or not. That’s why I’m very careful to use the phrase “last line evaluated” because any given script might have multiple potential last lines evaluated depending on the branching possible in the script.