Duplicate / insert row n times

Hi all

I have a table from airtable that I need to expand in the following way please.

I have a table that contains orders for hand made beanies that has a sku and a quantity.

SKU. QTY
ABC. 3
ABD. 2
DEF. 1

I need to create / update another table in the following way.

SKU. Allocated To
ABC
ABC
ABC
ABD
ABD
DEF

In essence duplicating the Sku’s for as many as needed in the QTY column. The source data may change and more qty added or removed so the new table needs to be able to reflect this.

This is because each is beanie is made by an individual maker and needs to be assigned to them.

This table is then printed out and filled in manually and then ultimately added back to airtable.

I’d like to do this in parabola if possible as it needs to be pushed to a few different places.

Thanks!

Jonathan

Hey Jonathan,

This was a fun (albeit confusing) one to figure out. This should work as long as you have an upper bound on how large your quantity field will be, and that upper bound is small enough that you can manually configure the Parabola flow for the first run. I’d definitely consider this solution a bit fragile, but within those constraints it should be fine.

This flow solves your current sample data and can handle quantities up to 4. To handle larger quantities, you’d need to add more “Insert math column” and “Insert if/else column” steps.

You can try it for yourself by copying and pasting this snippet onto your canvas: parabola:cb:a83c6d8a32ee4e098e3ddac9fdc2c374

Let me know if that helps!
Alex

3 Likes