I was thinking afterwards I could improve that code ...
The copy in the BEFORE ROW
CALL tier02_flat.clear()
FOR i = 1 TO tier01[tier01_row].tier02.getLength()
LET tier02_flat[i].t02_code = tier01[tier01_row].tier02[i].t02_code
LET tier02_flat[i].t02_id = tier01[tier01_row].tier02[i].t02_id
END FOR
could have been done in less lines using the .* notation
CALL tier02_flat.clear()
FOR i = 1 TO tier01[tier01_row].tier02.getLength()
LET tier02_flat[i].* = tier01[tier01_row].tier02[i].*
END FOR
or even better as one line of code using the copyTo method as the datatypes are the same....
CALL tier01[tier01_row].tier02.copyTo(tier02_flat)
or even better it could take advantage of the fact that assignment of dynamic arrays is done by reference ...
LET tier02_flat = tier01[tier01_row].tier02
thus the second DISPLAY ARRAY in the multi dialog could be an INPUT ARRAY or a DISPLAY ARRAY with CRUD and changes would be made to tier[tier01_row]
Unfortunately I could not think of a way for tier01_flat to be similarly populated by reference from tier01
Reuben