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

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

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:

  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.

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.

1 Like

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

Hi
Is there any template available concernant this app ?

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

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

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
2 Likes