Saturday, March 7, 2009

HMG: How to implement a comprehensive Editable Data Window with 1 line of code...

As most of us now, to maintain a Table of data, we probably must have a Data Window where one can :-

a) Browse data
b) Filter Data
c) Add a new record
d) Modify an existing record
e) Delete an unwanted record
f) Find records
g) Print a report based on the table

Obviously, it will take a lot of coding to achieve all of the above.

Take a look at the following screen. Pretty comprehensive looking and must have involved a lot of coding, right ? Would you believe that it can be done with 1 line of code ?



Would it shock you to know that the above was done with 1 line of code namely

EDIT EXTENDED ARDATA
where ARDATA = workarea

How about this ?



EDIT HLPFOREX
where HLPFOREX = workarea

Hmm... I don't think it can get easier :-)

See More on Extended Edit...

3 comments:

  1. Hola CHEE CHONG HWA,
    no olvides que tambien esta
    disponible en otras lenguas como:
    Español, Portugues, Ingles, Ruso
    y otras más.
    Salu2. Walter

    ReplyDelete
  2. Hi CCH,

    Thank you very much. (Now I don't want to write the same word "Excellent"!!!)

    I have some questions:-
    1. Can we use selected fields in Edit/Edit Extended?
    2. Can we use COMBOBOX along with Edit/Edit Extended?

    With best regards.

    Sudip Bhattacharyya

    ReplyDelete
  3. Hi Sudip

    Yes, you may via an array of fieldnames as in

    EDIT EXTENDED
    [ WORKAREA ]
    [ TITLE ]
    [ FIELDNAMES ]
    [ FIELDMESSAGES ]
    [ FIELDENABLED ]
    [ TABLEVIEW ]
    [ OPTIONS ]
    [ ON SAVE ]
    [ ON FIND ]
    [ ON PRINT ]

    CCH

    ReplyDelete