Read-only record list (DISPLAY ARRAY) / Using read-only record lists |
SCHEMA stock DEFINE cust_arr DYNAMIC ARRAY OF customer.* ... DISPLAY ARRAY cust_arr TO sr.* ATTRIBUTES(UNBUFFERED) ... END DISPLAY
Keep in mind that array members are bound to screen array fields by position, so you must make sure that the members of the array are defined in the same order as the screen array fields.
SCHEMA shop DEFINE a_items DYNAMIC ARRAY OF RECORD item_data RECORD LIKE items.*, it_image STRING, it_count INTEGER END RECORD ... DISPLAY ARRAY a_items TO sr.* ...
ON ACTION change LET arr[arr_curr()].field1 = newValue()
If the program array has the same structure as a database table (this is the case when the array is defined with a DEFINE LIKE clause), you may not want to display/use some of the columns. You can achieve this by using PHANTOM fields in the screen array definition. Phantom fields will only be used to bind program variables, and will not be transmitted to the front-end for display.