Workflow Question = Production Tracking

SOLVED

Hello,

I have a question with workflow. Basically, I'm trying to set up a workflow in the event that the amount tracked from the MTK object is either 5% above or below the expected quantity. Ex. If 36 units are expected, and only 30 are made (80%), a notification is triggered. The way I have it set up now is such:

Conditions

Header - (0.95 > ([M:MTK2]MFITOTQTY(0) / [M:MTK2]MFIUOMQTY(0))) ? (1.05 < ([M:MTK2]MFITOTQTY(0) / [M:MTK2]MFIUOMQTY(0)))

where ([M:MTK2]MFITOTQTY(0) / [M:MTK2]MFIUOMQTY(0))) represents the two numbers above for the first line. (I have also tried using | )

The issue I'm getting is with using the 'OR' clause, it seems that all tracked work orders are now triggering a notification (even those that are within the 0.95-1.05 range), which doesn't work.

When I change the '?' to an '&', it doesn't trigger anything because it's either below the 0.95 or above 1.05 (it cannot be both).

Has anyone run into this problem with using the 'or' before and what is the workaround. 

I guess I could create 2 seperate workflows for above 5% and below 5% with 2 different texts, but I'd rather have it in one. 

Thank you,

Mike

Sage ERP X3 V6.5 PU29

  • 0 in reply to Mirabelli7
    If you do not mind sharing - what was the resolution? I was wanting to create basically the same workflow! Thanks.
  • 0 in reply to Jeremy Rosenbaum

    I created 2 seperate workflow rules.

    First one (for losses of 5% or more):

    Condition (header) : (0.95 > ([M:MTK2]CPLQTY(0) / [M:MTK2]EXTQTY(0)))

    Object = MTK

    Action = Creation

    Message:

    Details as follows:

    Product: |[M:MTK2]ITMREF(0..49)|
    Desc: |[M:MTK2]ITMDES1(0..49)|
    Lot: |[M:MTK2]LOT(0..49)|
    Qty Achieved: |[M:MTK2]CPLQTY(0..49)|
    Qty Planned: |[M:MTK2]EXTQTY(0..49)|
    Variance: |ar2((([M:MTK2]CPLQTY(0..49)/[M:MTK2]EXTQTY(0..49))-1)*100)|%
    Track Date: |[M:MTK0]MFGTRKDAT|
    Room: |[M:MTK1]CPLWST(0..49)|

    Second one (for gains of 5% or more):

    Cond: (1.05 < ([M:MTK2]CPLQTY(0) / [M:MTK2]EXTQTY(0)))


    Message:

    Product: |[M:MTK2]ITMREF(0..49)|
    Desc: |[M:MTK2]ITMDES1(0..49)|
    Lot: |[M:MTK2]LOT(0..49)|
    Qty Achieved: |[M:MTK2]CPLQTY(0..49)|
    Qty Planned: |[M:MTK2]EXTQTY(0..49)|
    Variance: |ar2((([M:MTK2]CPLQTY(0..49)/[M:MTK2]EXTQTY(0..49))-1)*100)|%
    Track Date: |[M:MTK0]MFGTRKDAT|
    Room: |[M:MTK1]CPLWST(0..49)|

    Hope this helps.