Avatar

Level 10

Hi again,

I hope I can help too,

If I understand well, you want to set the number of instances of InjDiff to the number of instances of Claimants when the "new month" button is clicked... right?

If so,

you can use the method setInstances instead of using insertInstance, which will set the number of instances automatically to the number sent in parameter to the method.

So it should look something like the following :

But this will only set instances to one InjDiff subform.. if what you want is to set the instances of InjDiff within each Claimant's subforms, then you will need to loop through each Claimant's subform, like the following

I hope this will help ya!