Rules Engine: Changes from

Hi
Would it be possible to add a “Changes from” in the rules engine logic?

I have rules in webcore that I’m porting to sharptools, that trigger when a variable changes from 0.
The trigger cannot be simply “is not 0”, because it’s important to the rule that the variable WAS 0, and is now not 0.

Thanks in advance

Hi David-
I moved this into the Feature Requests category if you want to scroll up and cast a vote on it.

In the meantime, I believe you could accomplish this using variables. You could create a variable and then flip it to True whenever the variable changes to exactly 0. Then whenever the variable changes to something other than 0, if the variable is currently true, you can change it to false and run whatever actions you wanted preconditioned on the “changes from” concept.

Thanks Josh, and thanks for the idea.

Just an update that I believe the new ‘On Transition Only’ feature of triggers which is available to everyone in beta, should cover this request.

:tada: Announcing ‘On Transition Only’ Triggers

Beta Link: https://community.sharptools.io/t/beta-new-rule-triggers-changes-on-transition-only/13106

image

When configuring a trigger within this beta version, you’ll notice a new option labeled ‘On Transition Only’. This nifty feature changes the operator from ‘updates and is not’ → ‘changes to not’.

This means that your rule will only be activated when the trigger attribute transitions from matching your target value to not matching your target value. In other words, your rule comes into action only when the value ‘changes from’ your set threshold.

1 Like

This feature is now available!

:tada: Announcing ‘On Transition Only’ Triggers

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.