Attempting to set up an alert schedule that tests for conditions every 10 minutes and sends an alert the first time the conditions are met. Then only sends an alert email again when the conditions are fixed and are met again. Example, if inventory reaches under count 20, I get an email. I should not get another email until count reaches above 20 and then goes below 20 again. That's what I understand the Automatic Reset option is for, however, with that option I am still receiving the alert emails every 10 min. while conditions exist. Here's my example code for the conditions;
TABLE FILE FINAL2 PRINT ITEMID ITEMCODE AVAILABILITY ISSELLABLE2 ISSELLABLEWITHINVENTORYA2 ISSELLABLENOINVENTORYA2 INGOREINVENTORYA2 PHYSICALWAREHOUSEID PHYSICALWAREHOUSENAME LNINVENTORYDATE LNINVENTORYCOUNT AUTOORDERSTOCK ITEMSTATUS ITEMDESCRIPTION WHERE ISSELLABLE2 EQ 'Y'; WHERE AVAILABILITY LT 20; ON TABLE HOLD AS MASTER END -RUN
-IF &LINES EQ 0 GOTO ALERTEXIT;
TABLE FILE MASTER PRINT ITEMID ITEMCODE AVAILABILITY ISSELLABLE2 AS 'AVAILABLE TO WEB' ISSELLABLEWITHINVENTORYA2 AS 'ISSELLABLEWITHINVENTORY' ISSELLABLENOINVENTORYA2 AS 'ISSELLABLENOINVENTORY' INGOREINVENTORYA2 AS 'IGNOREINVENTORY' PHYSICALWAREHOUSEID PHYSICALWAREHOUSENAME LNINVENTORYDATE LNINVENTORYCOUNT AUTOORDERSTOCK ITEMSTATUS ITEMDESCRIPTION AS 'STATUS DESCRIPTION' WHERE ISSELLABLE2 EQ 'Y'; WHERE AVAILABILITY LT 20; ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE SET HTMLCSS ON ON TABLE SET STYLE *
$ ENDSTYLE END -RUN -ALERTEXIT
ThanksThis message has been edited. Last edited by: FP Mod Chuck,
September 16, 2019, 07:33 AM
MartinY
quote:
I should not get another email until count reaches above 20 and then goes below 20 again.
Not true. The reset is just to have the Alert schedule reset to run back again at specified interval. If your Alert is schedule to run at every 10 minutes and if your inventory is still below 20, you will receive an alert email at each 10 minutes where it's below 20 but you won't if it's above 20
E.g.
Run Time Inv count Alert
1:00 40 No
1:10 20 No
1:20 17 Yes
1:30 17 Yes
1:40 21 No
1:50 10 Yes
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007