I'm still trying to wrap my head around GlobalValue and @GlobalValue. I think I've come up with a use for it/them, but I'm uncertain how to go about it. Here's my current situation:
In my workorder form, one of the elements is named Creator, and this fills in each time a new form is opened. Here's the code I'm using:
// Sets the Creator of the Workorder
IF (@ISNEW AND @ISBLANK(CREATOR))
THEN CREATOR = @USERID
IF CREATOR = "SCOTT" THEN CREATOR = "SL"
ELSE IF CREATOR = "ROD" THEN CREATOR = "RM"
ELSE IF CREATOR = "JOE" THEN CREATOR = "JR"
ELSE IF CREATOR = "JOHN" THEN CREATOR = "JM"
ELSE IF CREATOR = "DAVE" THEN CREATOR = "DL"
ELSE IF CREATOR = "CHRIS" THEN CREATOR = "CC"
ELSE IF CREATOR = "DOUG" THEN CREATOR = "DS"
ELSE IF CREATOR = "MICHELLE" THEN CREATOR = "MT"
ELSE IF CREATOR = "JASON" THEN CREATOR = "JJ"
The user opens the form, the programming fills in the Creator field with his UserID, and then changes that to his initials.
So I'd like to fill the Global Values with the name and initials, and then grab the results as necessary. But 1) I'm not sure where I input the Global Values and 2) I'm not sure how I'd retreive them and pop them into Creator. As for step 2, I
think I'd need a statement like
Creator = @GlobalValue(@UserID)
but that's just a guess.
Someone please prod me in the right direction, thanks.