Hello,
I am struggling to find a way to add missing rows from the format to the final data set. I have 2 sets of data like below:


The first table contains sets of data and the second table contain the format each group must follow. If a row is missing from the group (For example, Input 3 is missing from group 3), the workflow will insert the missing row into the group (Insert Input 3 between Input 2 and 4 into group 3) and continue adding the missing rows until all of the groups has the correct format. This is my desired output:

Input 4 has been added to group 1 and 2. Input 3 has been added to group 3.
Than you.