Ad Widget

Collapse

Trigger assistance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrogers-9898
    Member
    • Sep 2008
    • 68

    #1

    Trigger assistance

    Is it possible to have Triggers, A, B, C set up like....

    C is Problem when A and B are Problem.

    C stays Problem, even if B goes OK

    C goes to OK (from Problem) only if And B are OK

    a picture of what I'm trying to achieve...



    thanks in advance...
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Originally posted by mrogers-9898
    Is it possible to have Triggers, A, B, C set up like....

    C is Problem when A and B are Problem.

    C stays Problem, even if B goes OK

    C goes to OK (from Problem) only if And B are OK
    It is. Here is some pseudo-code of the top of my head that shows how I think you need to do it:

    ({TRIGGER.STATUS}=0 & ({TRIGGER-A.last()}>0 & {TRIGGER-B.last()}>0)) | ({TRIGGER.STATUS}=1 & ({TRIGGER-A.last()}<1 & {TRIGGER-B.last()}<1))

    Note: I'm assuming A + B fire with a non-zero value. It's illustrative.

    I have a query about your logic though. You say that C will fire when A and B fire. But you say that C will stay in a problem state when A OR B is in a problem state. Wouldn't the expression make more sense like this:

    ({TRIGGER.STATUS}=0 & ({TRIGGER-A.last()}>0 | {TRIGGER-B.last()}>0)) | ({TRIGGER.STATUS}=1 & ({TRIGGER-A.last()}<1 & {TRIGGER-B.last()}<1))


    Regards,
    David

    Comment

    Working...