manujmathew
New Member
I want to capture the LABEL of a field in a variable when I fire a trigger while running a program.
I have used FOCUS:LABEL.
eg:
DEF VAR testvar AS CHAR LABEL "CUSTOMER" NO-UNDO.
ON LEAVE ANYWHERE
DO:
testvar = FOCUS:LABEL.
END.
UPDATE testvar WITH FRAME sframe.
DISP testvar WITH FRAME sframe.
But I want to capture it when I'm using a trigger with Write statement.
eg:
ON WRITE OF table-name
DO:
testvar = FOCUS:LABEL.
END.
RUN test.p.
Here I'm getting run time error 3140.
Is there a solution where I can capture the label in write statement.
I have used FOCUS:LABEL.
eg:
DEF VAR testvar AS CHAR LABEL "CUSTOMER" NO-UNDO.
ON LEAVE ANYWHERE
DO:
testvar = FOCUS:LABEL.
END.
UPDATE testvar WITH FRAME sframe.
DISP testvar WITH FRAME sframe.
But I want to capture it when I'm using a trigger with Write statement.
eg:
ON WRITE OF table-name
DO:
testvar = FOCUS:LABEL.
END.
RUN test.p.
Here I'm getting run time error 3140.
Is there a solution where I can capture the label in write statement.