Bulk create records - with template

Hi @marcusreed98,

The most widely used form of looping in Tulip apps today (that I’m aware of) typically follows along the general principle of using step open triggers to repeat actions while iterating through an array. It sounds like you have your array already in mind, so I’ll try to describe more of the first part.

To start the loop, you may use a button, timer, or some other source of a trigger to initiate the action. In this block, users will typically set an iterator (i.e. an index variable to 0) and a length they want to run the loop for (may be length of array or total number of loops). This then uses a transition event to move to the looping step.

On the looping step, an on step enter trigger can be built where you:

  1. Check condition if index variable < length, if yes:
  2. Get array element by index variable
  3. Do whatever steps you want to implement in the loop (i.e. write to a table)
  4. increment the index variable by one
  5. Transition to the same looping step, which will re-execute the step open action
  6. If condition from step #1 is false:
  7. break out of the loop by moving to next step or not running transition from step #5

As mentioned above, we have limits for how many of these step open triggers can be run consecutively before Tulip exits the loop. However, it’s very easy to manually continue as you’ll have the index and length variable to still re-iterate through.

Let me know if that helps or if you have any specific questions!