BAM e-mail notification (not)

thanks Butch and Patrick.
with your help, this procedure works as expected. It turns out that I
had a blank
in the "from" e-mail address in the BAM. When that is blank, nothing
happens.
Again, thank you for your help.

kind regards,
I have this script attached to a BAM global that only fires for
partnumber s-0167.
can anyone see where the problem lies?


{ud/GlbAlert.i &TableName = "RcvDtl"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

FIND part WHERE RcvDtl.Partnum = 's-0167' NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 's-0167'
THEN DO:
ASSIGN Email-Text = "Receipt Information - ~n~n"
+ "PONum " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
+ "POLine " + STRING(Mfgsys.RcvDtl.PoLine) + "~n"
+ "PackSlip " + STRING(RcvDtl.PackSlip).

FIND part WHERE RcvDtl.PartNum = 's-0651' NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 's-0651'
THEN DO:
ASSIGN Email-Text = "Receipt Information - ~n~n"
+ "PO Num " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
+ "PO Line " + STRING(Mfgsys.RcvDtl.PoLine) + "~n"
+ "PackSlip " + STRING(Mfgsys.RcvDtl.PackSlip).

IF RcvDtl.PartNum <> 's-0167' or RcvDtl.PartNum <> 's-0651'
THEN RETURN "Cancel Send":U.

END.
END.

mucho gracias~




[Non-text portions of this message have been removed]
I am a BAM newbie myself, but try changing your "or" to "and".
With "or", one of the two scenarios is always true, so the email is
canceled.

Michael Randolph
Purchasing Manager
American Magnetics, Inc.

--- In vantage@yahoogroups.com, "PLAMAN DICK" <dick.plaman@T...>
wrote:
> I have this script attached to a BAM global that only fires for
> partnumber s-0167.
> can anyone see where the problem lies?
>
>
> {ud/GlbAlert.i &TableName = "RcvDtl"}
> DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.
>
> FIND part WHERE RcvDtl.Partnum = 's-0167' NO-LOCK NO-ERROR.
> IF RcvDtl.PartNum = 's-0167'
> THEN DO:
> ASSIGN Email-Text = "Receipt Information - ~n~n"
> + "PONum " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
> + "POLine " + STRING(Mfgsys.RcvDtl.PoLine) + "~n"
> + "PackSlip " + STRING(RcvDtl.PackSlip).
>
> FIND part WHERE RcvDtl.PartNum = 's-0651' NO-LOCK NO-ERROR.
> IF RcvDtl.PartNum = 's-0651'
> THEN DO:
> ASSIGN Email-Text = "Receipt Information - ~n~n"
> + "PO Num " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
> + "PO Line " + STRING(Mfgsys.RcvDtl.PoLine)
+ "~n"
> + "PackSlip " + STRING(Mfgsys.RcvDtl.PackSlip).
>
> IF RcvDtl.PartNum <> 's-0167' or RcvDtl.PartNum <> 's-0651'
> THEN RETURN "Cancel Send":U.
>
> END.
> END.
>
> mucho gracias~
>
>
>
>
> [Non-text portions of this message have been removed]
Dick,
> FIND part WHERE RcvDtl.PartNum = 's-0651' NO-LOCK NO-ERROR.
In addition to the And/or problem noted by Michael the line above will not
provide any benefit.
You are asking to find a part master file where a contrition unrelated to
the part master exists.
If you would like to find the Part record for the RcvDtl your line should
look more like:

FIND Part WHERE Part.Company = RcvDtl.Comapany AND
Part.PartNum = RcvDtl.PartNum NO-LOCK NO-ERROR.

Then you will be able to use information from the part table.
If you do not need information from the part table, the line can and should
be eliminated.
Good luck,
Aaron Hoyt
Vantage Plastics

-----Original Message-----
From: ami_miker [mailto:michael.randolph@...]
Sent: Thursday, March 10, 2005 11:00 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BAM e-mail notification (not)




I am a BAM newbie myself, but try changing your "or" to "and".
With "or", one of the two scenarios is always true, so the email is
canceled.

Michael Randolph
Purchasing Manager
American Magnetics, Inc.

--- In vantage@yahoogroups.com, "PLAMAN DICK" <dick.plaman@T...>
wrote:
> I have this script attached to a BAM global that only fires for
> partnumber s-0167.
> can anyone see where the problem lies?
>
>
> {ud/GlbAlert.i &TableName = "RcvDtl"}
> DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.
>
> FIND part WHERE RcvDtl.Partnum = 's-0167' NO-LOCK NO-ERROR.
> IF RcvDtl.PartNum = 's-0167'
> THEN DO:
> ASSIGN Email-Text = "Receipt Information - ~n~n"
> + "PONum " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
> + "POLine " + STRING(Mfgsys.RcvDtl.PoLine) + "~n"
> + "PackSlip " + STRING(RcvDtl.PackSlip).
>
> FIND part WHERE RcvDtl.PartNum = 's-0651' NO-LOCK NO-ERROR.
> IF RcvDtl.PartNum = 's-0651'
> THEN DO:
> ASSIGN Email-Text = "Receipt Information - ~n~n"
> + "PO Num " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"
> + "PO Line " + STRING(Mfgsys.RcvDtl.PoLine)
+ "~n"
> + "PackSlip " + STRING(Mfgsys.RcvDtl.PackSlip).
>
> IF RcvDtl.PartNum <> 's-0167' or RcvDtl.PartNum <> 's-0651'
> THEN RETURN "Cancel Send":U.
>
> END.
> END.
>
> mucho gracias~
>
>
>
>
> [Non-text portions of this message have been removed]





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
Thanks Michael and Aaron,
i took your advice but now I can't get anything to happen.
this friggin' thing can be very frustrating (especially when I don't
know
that the &%$# I'm doing) The global alert broker is running, I have this
procedure
pegged to a valid e-mail address. There are no global alert errors.
can you see a problem with this code? or does anyone have a cyanide pill
they can spare?

{ud/GlbAlert.i &TableName = "RcvDtl"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

IF RcvDtl.PartNum = 's-0167' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0167' /* I took this statement out, but no
difference: */
THEN DO:
ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).

IF RcvDtl.PartNum = 'S-0651' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0651'
THEN DO:

ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
END.
Dick.

Try this:

{ud/GlbAlert.i &TableName = "RcvDtl"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.
IF RcvDtl.PartNum = 's-0167' THEN DO:
ASSIGN Email-Subject = 'Receiving part S-0167 by ' + USERID.
ASSIGN Email-Text = 'For Receipt Information click on the attachment'.
END.
ELSE DO:
RETURN ERROR.
END.


Also check the check box in BAM to "include link". The person receiveing the
email should be able to click on the link and bring up the receipt.


Patrick Winter


-----Original Message-----
From: PLAMAN DICK [mailto:dick.plaman@...]
Sent: Thursday, March 10, 2005 2:49 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BAM e-mail notification (not)


Thanks Michael and Aaron,
i took your advice but now I can't get anything to happen.
this friggin' thing can be very frustrating (especially when I don't know
that the &%$# I'm doing) The global alert broker is running, I have this
procedure pegged to a valid e-mail address. There are no global alert
errors.
can you see a problem with this code? or does anyone have a cyanide pill
they can spare?

{ud/GlbAlert.i &TableName = "RcvDtl"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

IF RcvDtl.PartNum = 's-0167' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0167' /* I took this statement out, but no
difference: */
THEN DO:
ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).

IF RcvDtl.PartNum = 'S-0651' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0651'
THEN DO:

ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
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
Try this as a starting point:

{ud/GlbAlert.i &TableName = "RcvDtl"}



IF (RcvDtl.PartNum = "s-0167") or (RcvDtl.PartNum = "S-0651") THEN DO:

FIND part WHERE part.Company = RcvDtl.Company and

part.PartNum = RcvDtl.PartNum NO-LOCK NO-ERROR.

ASSIGN Email-Text = "Receipt Information " + "~n"

+ "PO Number: " + STRING(Mfgsys.RcvDtl.PoNum) + "~n"

+ "PO Line: " + STRING(Mfgsys.RcvDtl.PoLine) + "~n"

+ "Packslip: " + STRING(RcvDtl.PackSlip) + "~n"

+ "Our Qty: " + STRING(RcvDtl.OurQty) + "~n"

+ "Part Number: " + STRING(RcvDtl.PartNum).



ASSIGN Email-Subject = RcvDtl.PartNum + " has been received".



ASSIGN Email-To = "EmailAddress@...".



END.

ELSE DO:

RETURN "Cancel Send":U.

END.



Butch


________________________________

From: PLAMAN DICK [mailto:dick.plaman@...]
Sent: Thursday, March 10, 2005 12:49 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BAM e-mail notification (not)


Thanks Michael and Aaron,
i took your advice but now I can't get anything to happen.
this friggin' thing can be very frustrating (especially when I don't
know
that the &%$# I'm doing) The global alert broker is running, I have this
procedure
pegged to a valid e-mail address. There are no global alert errors.
can you see a problem with this code? or does anyone have a cyanide pill
they can spare?

{ud/GlbAlert.i &TableName = "RcvDtl"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

IF RcvDtl.PartNum = 's-0167' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0167' /* I took this statement out, but no
difference: */
THEN DO:
ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).

IF RcvDtl.PartNum = 'S-0651' THEN DO:
FIND part WHERE part.company = RcvDtl.Company and
part.partNum = RcvDtl.PartNum NO-LOCK NO-ERROR.
IF RcvDtl.PartNum = 'S-0651'
THEN DO:

ASSIGN Email-Text = "Receipt Information "
+ STRING(Mfgsys.RcvDtl.PoNum)
+ STRING(Mfgsys.RcvDtl.PoLine)
+ STRING(RcvDtl.PackSlip)
+ STRING(RcvDtl.OurQty)
+ STRING(RcvDtl.PartNum).
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
END.
ELSE DO:
RETURN "Cancel Send":U.
END.
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 Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129d3jvkr/M=298184.6018725.7038619.3001176/
D=groups/S=1705007183:HM/EXP=1110574157/A=2593423/R=0/SIG=11el9gslf/*htt
p://www.netflix.com/Default?mqso=60190075>

<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=group
s/S=:HM/A=2593423/rand=782919721>

________________________________

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]