Global Alerts .P program PLEASE HELP

Thanks for the line of code, Wayne. It does work and I am MOST
apprecieative! Thanks! Joey


> You used to be able to use this definition to access the global
variable for the user id :
>
> define {1} shared var DCD-USERID like UserFile.DcdUserID no-undo.
>
> Probably still works in the new versions, but you'll have to try it
yourself.
>
> -Wayne Cox
> Twenty Three -- Information Technology Consulting
> 828-685-2338
>
>
>
> [Non-text portions of this message have been removed]
Does anyone use an "Alert Program"( xxx.p) when sending out Global
Alerts? I would like to be able to conditionally send out an alert
based on the user id. For instance, the following code doesn't work
because it never knows who the user id is. Does anyone know how to
alter this code so it grabs the current user id???? PLEASE HELP!
Thanks. Joey

----------------------------------------------------------------
{ud/GlbAlert.i &TableName = "Part"}

DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

IF USERID <> "manager"

THEN DO:
ASSIGN Email-Subject = "Part Master Record Changed".
ASSIGN Email-Text = "Part Master record "
+ string(Part.PartNum)
+ " has been changed to "
+ string(Part.PartDescription)
+ " changed by "
+ string(USERID).
END.
ELSE DO:
Return Error.
END.
--------------------------------------------------------------------
At 03:06 PM 2/4/2004, you wrote:
>Does anyone use an "Alert Program"( xxx.p) when sending out
>Global Alerts? I would like to be able to conditionally send out an
>alert based on the user id. For instance, the following code doesn't
>work because it never knows who the user id is. Does anyone know how to

You used to be able to use this definition to access the global variable
for the user id :

define {1} shared var DCD-USERID like UserFile.DcdUserID no-undo.

Probably still works in the new versions, but you'll have to try it yourself.

-Wayne Cox
Twenty Three -- Information Technology Consulting
828-685-2338



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