Adding rows in one object based on another

This post may help. Not sure as I haven’t reviewed how it works.

https://community.skuid.com/t/iterate-over-data-and-change-the-value-of-a-field-until-condition-is-not-met-anymore-no-more-code