Ok, give a shot with this. I have reversed the logic.
My thought process is that it may be that the ActBurCost field may not
contain a 0 until after the job is started. It may have no value at all
until the time something is specifically written to it. If that is the
case, the logic will fail and not enter the else phase, thereby not running
the Assign or the Cancel.
The Code is included below.
Let me know the results.
There may be some other tricks, like string...trim the job number that may
apply.
Good luck,
Aaron Hoyt
Vantage Plastics
{ud/GlbAlert.i &TableName = "JobOper"}
IF JobOper.Company <> "TAM" AND JobOper.JobNum <> "058013" AND
JobOper.AssemblySeq <> 0 AND JobOper.OprSeq <> 20 AND
OLDJobOper.ActBurCost <> 0 THEN DO:
RETURN "Cancel Send":U.
END.
ELSE DO:
ASSIGN Email-Subject = "McNally order"
Email-From = "allen.larsen@..."
Email-To = "allen.larsen@..."
Email-Text = "The McNally order has started machining
(JOB 058013). ~n"
+ "Prepare an invoice. McNally is COD.".
END.
-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]On Behalf
Of al2trace
Sent: Friday, August 26, 2005 9:11 AM
To: vantage@yahoogroups.com
Subject: [Vantage] More BAM
This is my second customized BAM. Things are going pretty well but
this one has a minor flaw in it somewhere. Most of the time, it
should just not send anything. My goal is that it will only send a
message when this operation is started. When I first installed it,
all of the "Cancel Sends" were going to my "Global Alert Message
Error Log" saying that there was no e-mail address. When I put in
an e-mail address on the BAM maintenance screen, the "Cancel Sends"
were sent to that e-mail. Any thoughts on how to make the "Cancel
Sends" not do anything at all.
code follows
{ud/GlbAlert.i &TableName = "JobOper"}
IF JobOper.Company = "TAM" AND JobOper.JobNum = "058013" AND
JobOper.AssemblySeq = 0 AND JobOper.OprSeq = 20 AND
OLDJobOper.ActBurCost = 0 THEN DO:
ASSIGN Email-Subject = "McNally order"
Email-From = "allen.larsen@..."
Email-To = "allen.larsen@..."
Email-Text = "The McNally order has started machining
(JOB 058013). ~n"
+ "Prepare an invoice. McNally is COD.".
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links
My thought process is that it may be that the ActBurCost field may not
contain a 0 until after the job is started. It may have no value at all
until the time something is specifically written to it. If that is the
case, the logic will fail and not enter the else phase, thereby not running
the Assign or the Cancel.
The Code is included below.
Let me know the results.
There may be some other tricks, like string...trim the job number that may
apply.
Good luck,
Aaron Hoyt
Vantage Plastics
{ud/GlbAlert.i &TableName = "JobOper"}
IF JobOper.Company <> "TAM" AND JobOper.JobNum <> "058013" AND
JobOper.AssemblySeq <> 0 AND JobOper.OprSeq <> 20 AND
OLDJobOper.ActBurCost <> 0 THEN DO:
RETURN "Cancel Send":U.
END.
ELSE DO:
ASSIGN Email-Subject = "McNally order"
Email-From = "allen.larsen@..."
Email-To = "allen.larsen@..."
Email-Text = "The McNally order has started machining
(JOB 058013). ~n"
+ "Prepare an invoice. McNally is COD.".
END.
-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]On Behalf
Of al2trace
Sent: Friday, August 26, 2005 9:11 AM
To: vantage@yahoogroups.com
Subject: [Vantage] More BAM
This is my second customized BAM. Things are going pretty well but
this one has a minor flaw in it somewhere. Most of the time, it
should just not send anything. My goal is that it will only send a
message when this operation is started. When I first installed it,
all of the "Cancel Sends" were going to my "Global Alert Message
Error Log" saying that there was no e-mail address. When I put in
an e-mail address on the BAM maintenance screen, the "Cancel Sends"
were sent to that e-mail. Any thoughts on how to make the "Cancel
Sends" not do anything at all.
code follows
{ud/GlbAlert.i &TableName = "JobOper"}
IF JobOper.Company = "TAM" AND JobOper.JobNum = "058013" AND
JobOper.AssemblySeq = 0 AND JobOper.OprSeq = 20 AND
OLDJobOper.ActBurCost = 0 THEN DO:
ASSIGN Email-Subject = "McNally order"
Email-From = "allen.larsen@..."
Email-To = "allen.larsen@..."
Email-Text = "The McNally order has started machining
(JOB 058013). ~n"
+ "Prepare an invoice. McNally is COD.".
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links