I'm starting at Progress 4gl, and would like to learn how to make a simple customer registration or anything related to a CRUD. I would like to do using temp-tables. I have been researching and I have come to this, I am modifying but I have not yet arrived at what I wanted.
DEFINE TEMP-TABLE tt
FIELD a AS INT
FIELD b AS CHAR.
DEFINE BUTTON bt LABEL "Modify".
DEFINE BUTTON btS LABEL "Save".
DEFINE QUERY qr FOR tt.
DEFINE BROWSE br QUERY qr DISPLAY tt.a tt.b WITH SIZE 60 BY 4 .
DEFINE FRAME f
br bt
tt.a SKIP tt.b btS WITH THREE-D SIDE-LABELS.
ON 'choose':U OF bt IN FRAME f
DO:
RUN updateRecord.
END.
ON 'choose':U OF btS IN FRAME f DO:
FIND FIRST tt WHERE tt.a = INPUT FRAME f tt.a NO-ERROR.
ASSIGN tt.a = INPUT FRAME f tt.a
tt.b = INPUT FRAME f tt.b.
BROWSE br:REFRESH().
CLEAR FRAME f.
END.
/* Create some test records */
CREATE tt. ASSIGN a = 1 b = 'first'.
CREATE tt. ASSIGN a = 2 b = 'second'.
CREATE tt. ASSIGN a = 3 b = 'third'.
OPEN QUERY qr FOR EACH tt.
ENABLE ALL EXCEPT tt.a tt.b WITH FRAME f.
WAIT-FOR CLOSE OF CURRENT-WINDOW.
PROCEDURE updateRecord:
DISPLAY tt.a tt.b WITH FRAME f.
ENABLE tt.a tt.b WITH FRAME f.
END PROCEDURE.
If anyone can help, or recommend some site to help me learn.