How to run a loop?

So, here’s what I’d like to do:
Take the amount from a form and run a SQL Insert Statement X times.

I’ve set it up properly to get the value and Ive tried running it with the iterator. However, with the iterator it doesnt run x times, it runs once with i = x.

So my question is: Is there a dedicated loop function? Or is there a way to convert a 5 into 5 iterations?

Thank you!

Hi, Providing a specific number to set the iterator is not an available feature for now. we don’t have this feature out of the box yet, but you can apply for it here: Feature requests | Jet Admin - we’re regularly reviewing the requests and put the most popular/important ones on our roadmap. :slightly_smiling_face:

But to make it work you should populate the iterator with a data set that then it will loop on each record in it.

hope this helped

Thank you for the reply. What im looking for isnt that, its way simpler.

I just want to run a loop!

And if there is only an interator, i will need to convert (example: 7) into 1,2,3,4,5,6,7 so i can get 7 loops.
Does that make sense? Is there a loop function?

The iterator is a loop function but it works only to loop on datasets not on a specific number

So there is no loop function at all? Thats such a basic feature :frowning:

I guess the workaround would be to create a table where 1 has 1 entry, 2 has 2 entries, and so on? Come on :sweat_smile:

I think you just have to create a list in the Iterator step, using JS, with the same length as you want :


Edit : replace “5” by “nbIter” in the step #2

1 Like