13. Creating Dynamic Frames : How You Can Create and Modify Fields Dynamically : How You Can Create Dynamic Composite Fields : Loop through some array to get information abouteach field to be added. Create fields and set theirattributes. : Loop through some array to get information abouteach field to be added. Create fields and set theirattributes.
 
Share this page                  
Loop through some array to get information about
each field to be added. Create fields and set their
attributes.
...
mfield.InsertChild(fieldtoinsert = trim,
    row = i, column = 1);
mfield.InsertChild(fieldtoinsert = efields[j],
    row = i, column = 2);
endfor;
/* get rid of extraneous rows */
mfield.CollapsePolicy = CP_ROWS;
For more information about the CollapsePolicy attribute of the MatrixField system class, see the Language Reference Guide.