Skip to main content
Solved

Create a repeating automation based on a number entered into a field

  • February 18, 2026
  • 3 replies
  • 18 views

Graham Reed
Forum|alt.badge.img+7

Hello all.

I’m wanting to run an automation that will create x number of new records in a table, where x is a number entered into a field (on another table).

So someone wants 5 new records, the enter 5 into the field, the automation runs 5 times.

I’ve seen this: 



But not entirely sure I understand how to implement this!

Help muchly appreciated.

Best answer by TheTimeSavingCo

Hm, if you’re comfortable with using a script that would be much more straightforward.  I think I was optimizing for not using scripts back then heh

The idea would be to feed the number value into a script that’ll generate an array with that number of items, then use that array in a repeating group action

I’ve set it up here for you to check out
 

 

And here’s how the automation looks with the script:

let {numRecords} = input.config()

let array = []

for (let i = 1; i <= numRecords; i++){
array.push(i)
}

output.set('array', array)

 

3 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, if you’re comfortable with using a script that would be much more straightforward.  I think I was optimizing for not using scripts back then heh

The idea would be to feed the number value into a script that’ll generate an array with that number of items, then use that array in a repeating group action

I’ve set it up here for you to check out
 

 

And here’s how the automation looks with the script:

let {numRecords} = input.config()

let array = []

for (let i = 1; i <= numRecords; i++){
array.push(i)
}

output.set('array', array)

 


Graham Reed
Forum|alt.badge.img+7
  • Author
  • Known Participant
  • February 19, 2026

Thanks Adam.

I’m not but I’d like to be. So the scrip creates an empty array with the number of records you specified in the field, so that the loop then has an array as a base to iterate through x number of times?

Does this mean the script is a generic ‘create a blank array of x records’ that can be used in different scenarios? 

Much appreciated, wanting to learn as much as just using this!


TheTimeSavingCo
Forum|alt.badge.img+31

So the scrip creates an empty array with the number of records you specified in the field, so that the loop then has an array as a base to iterate through x number of times?

Ah, specifically, it’ll create an array with [1, 2, 3, 4, etc] until it hits the number we want, does that make sense?

---
Does this mean the script is a generic ‘create a blank array of x records’ that can be used in different scenarios? 

Yeap to this too!