tricky DAT massaging

Using the attached file as a simplified example, I’m looking for a way to convert table1 to table2, without having to run a script.

Quick description:
for each row in table1
if the LABEL column is filled, first add a row named as the LABEL to table2, use “label” for the TYPE column
then add the row itself, named as the PARAM, use table1’s TYPE for TYPE.
If the PARAM’s name would expand to multiple rows, add these as well (an additional SIZE column could be there if it helps)
The rest should be self-explanatory if looking at both tables

convert.toe (5.36 KB)
Any ideas?

okay, I was curious…

can probably be simplified a little, and does rely on there being a maximum number of parameters.

Selina
convert.toe (6.13 KB)

awesome. thank you selina. with your ideas I was able to make it dynamic.
dynamic.toe (6.27 KB)