User interface / Display of static information |
The CLEAR SCREEN ARRAY instruction clears the values of all rows of the form list identified by the specified screen array.
CLEAR SCREEN ARRAY screen-array.*
After executing a DISPLAY ARRAY or INPUT ARRAY instruction, values remain in the form list identified by the screen array.
The CLEAR SCREEN ARRAY instruction automatically clears all rows of the list, regardless of the view: a TABLE, TREE, SCROLLGRID, or in a matrix of fields (an old-style/text-mode static screen array).
The CLEAR SCREEN ARRAY instruction replaces code which clears each individual row through the use of a loop:
-- Clearing each row individually FOR i=1 TO <screen-array-length> CLEAR screen-array[i].* END FOR -- Unique instruction to clear a list CLEAR SCREEN ARRAY screen-array.*
Using the CLEAR SCREEN ARRAY instruction eliminates the need for calculating the screen array length, a value which can change when using a TABLE container, that can be resized.
The CLEAR SCREEN ARRAY instruction is usually not needed if the program is always in the context of a dialog controlling the form fields.
... DISPLAY ARRAY cust_arr TO sa.* ... CLEAR SCREEN ARRAY sa.* ...