Nested subforms can be utilized to replicate a set of form objects dynamically based on some data.
Form definitions can be used to build and load forms dynamically. With multiple objects, there can be alot to manage. If a set of form objects need to be reproduced, utilizing nested subforms can be easier to manage.
For example, if a set of three objects needs to be replicated based on a number of subrecords, the three objects need to be created and positioned individually.
Instead, format the three objects first on a form.
Then apply the form in a subform on a new form as a container.
Finally, on the final form, use another subform referencing the container.
When the form and data loads, load the definition of the container form using the FORM Convert to dynamic command. In the results of the FORM Convert to dynamic command, the subform object should be in the only object on the first page. For each additional copy of the subform update the definition object to add a copy of the subform object definition while applying a new name, specifying a new process variable, and updating the position relative to the subform container.
One thing to note is to make sure to pass the relevant data to the subform container from the parent form. The subform will load this data in the Form object which can be used to populate the objects.