Instuctions To Build a Message Stack Command On The Fly

Here a a trick that will allow you to just throw a message number into the AUDA and then have a TCL actually just stack that message. 

This was used at one site to allow Order Set Builders to stack an error with the orderset.  All they needed to do was to enter the error number on the screen, into that UField.   The UField would be stored in the @TCL so when needed the TCL outlined below would be used to actually stack the error message, no matter what number it was.

In this case, the message number in UOMREMSG will be the message diaplayed:


DVA:

"%GECNGHX"=' '
"%GECNGHX"='06/15/98 -  NEW'
"%GECNGHX"='ORDER SET STACK ERROR MESSAGE'
"UCHAR6"=' $MSG='
"UCHAR1"=';'

Stack:

$D=%ORPCMRI

Conditional Stack:

WHERE "UOMREMSG" IS VALUED
THEN "PCALC"=' "PCALC#02"="UCHAR6"||"UOMREMSG"||"UCHAR1";',
"PCALC#02"=' $D=PCALC',
$P=CHPPDVAL,
$P=CHPPDVAL,
$D=PCALC???,
$D=UOMREMSG