Rules with multiple IF statements

Aussa

2015-11-02 01:47:40

Here is my current set of rules I am working on:

Code: Select all

if ka==0 then ka=1
exit rules, execute Outgoing Action
if ka!=1 then ka=1
exit rules, skip Outgoing Action
if ka==1 then ka=0
exit rules, execute Outgoing Action
Is there a way so my execute/skip outgoing action can only be executed if the prior if statement is true? Or is there a way for a Then conditional to have two modifiers?

Any Help is appreciated.
~Aussa

DvlsAdvct

2015-11-02 02:28:00

Hi Aussa

Unfortunately, an if/then statement cannot have two conditionals, only one. You might be more interested in using labels. It would be something like:

Code: Select all

in ka==0 then Goto "Zero"
if ka==1 then Goto "One"
if ka>1 then Goto "Greater"
Label "Zero"
ka=1
Exit rules, execute outgoing action
Label "One"
ka=0
Exit rules, execute outgoing action
Label "Greater"
ka=1
Exit rules, skip outgoing action
It's more lines of rules, but it's more manageable, and easier to make changes to. I used the >1 for the third rule only because it would be easier to process. You have a rule for 0, 1, and hence everything else would be greater than 1 (assuming we aren't dealing with pesky negative values).

Does that help?
J

Aussa

2015-11-02 02:50:20

DvlsAdvct,

Thank you for the assistance! Works beautifully now! :D

~Aussa