# How to make loops of rows and repeat them dynamic number of times

**URL:** <https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391>\
**Category:** Community Resources\
**Tags:** tutorial\
**Created:** [May 5, 2023, 3:30pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391 "2023-05-05T15:30:07Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 20, 2023, 12:58pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/21 "2023-05-20T12:58:47Z")

</div>

> [@Pratik\_Shah](#):
>
> ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/1/816e27983b7e29254efd494289f1f3e70fb0cf2e.png)

This looks like A LOT of work 😱 I’m assuming “Add rows” also carries the Product name into that new row?

> [@Pratik\_Shah](#):
>
> As of now, we are not going to delete anything. But yes probably we may think with that option once submissions are closed.

Either way, you’ll have a huge table eventually. The difference between using Make to create rows and the method I’m offering is how the rows are created. Make can potentially do it automatically; with my method, you’d have to monitor it and add rows as needed. You won’t lose any data, but visibility may be limited until those rows are added.

I wonder if it’s possible to set up Make to monitor a table and create new rows when it runs out of space? You could probably reuse your adding rows action here, though, with the difference that you don’t have to specify/lock in what data needs to be in those new rows.

Here’s how I would do what you’re looking for:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/6/36f2bf62cb13d970aee8be5216a9a7005e229a3f.png)

1. The user submits a product to the “Products” table. The submission contains a list of states. You just need a CSV of those, and there are a few ways to do it (50 columns would not be my preferred way, though)
  - Upon thinking about it a bit more, you’ll also need to append your states with the product name. I’ve used the “Joined text” column with my product ID as a separator to do so.

2. You’ll need to have all those lists combined through a joined list. If the admin is the one who needs to see this list of projects, I’d probably use the admin profile. Data stored in the user profile is cool because you can use it in a template column without wracking your brain on relations.
  - Actually, I just tried, and if you don’t care about limiting the visibility, you can simply have a joined list column in the tracking table.

3. For the tracking table, you’ll need an index column (writing up now how to create it automatically) and your joined list propagated into each row. Then you essentially use the Miracle method to transpose your joined list into rows.

I wish new apps allowed copying apps again… It would be quick to make a prototype but I don’t think I’m explaining this very well.

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 20, 2023, 1:24pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/22 "2023-05-20T13:24:33Z")

</div>

Here, I had one of the old prototypes that I could repurpose here. I didn’t bother with the layout, but if you copy it, you should be able to see the tables.

> **[Prototype](https://productstates.glideapp.io)**

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 20, 2023, 9:26pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/23 "2023-05-20T21:26:11Z")

</div>

I switched from Glide rows to JSON files a long time ago… so I don’t have problems like that 😉  
Simple JavaScript takes care of any solution to any problem… plus it has so many other benefits that I can’t mention here.

---

<div class="post-metadata">

**Author:** ![zephir](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zephir](https://community.glideapps.com/u/zephir)\
**Post date:** [June 28, 2023, 7:13pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/25 "2023-06-28T19:13:07Z")

</div>

Hi  
Is there any template available concernant this app ?

> **[Loopy](https://loopy.glide.page/dl/6471c6/s/637187/r/tXwcyKmsSJeRLM0ibnTvAA)**
>
> Prototype for making loops in Glide

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [July 13, 2023, 2:15pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/26 "2023-07-13T14:15:44Z")

</div>

Not that I’m aware of. What are you trying to do?

---

<div class="post-metadata">

**Author:** ![zephir](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zephir](https://community.glideapps.com/u/zephir)\
**Post date:** [July 13, 2023, 3:01pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/27 "2023-07-13T15:01:47Z")

</div>

I try to loop through a list, and trigger an insert action according some datas are empty or not.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 14, 2023, 1:06pm UTC](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391/28 "2023-07-14T13:06:30Z")

</div>

In short, looping is not a natively supported action inside Glide. You have 2 choices here:

- Use an external service like Make
- If you don’t plan to scale that action, use a bunch of logic branches in a combo action to deal with it

[Previous page](https://community.glideapps.com/t/how-to-make-loops-of-rows-and-repeat-them-dynamic-number-of-times/61391.md?page=1)
