Hi, i am building a scheduled event that creates a year object for each year. Now i would like to make it so that each time it checks the year it also checks the following 5 years. However, it currently is not possible to loop or repeat something a predefined number of times. Is there anyone who ever encountered a similar problem and if so how did you solve this? Edit: Thanks for all the answers people, here is the solution i came up with based on your suggestions.
Pieter van de Braak
I think check the examples in the "Random data generator" in the App store. There is an example in it you can use for this purpose.
In fact you begin with
variable offset = 0 and variable
amount = number of recurring entries
Loop over your actions and change offset = offset +1
You loop till offset > amount
I haven't tried this, but I have thought about it. Maybe you can simulate a predefined loop by putting a retrieve action of the object you want to loop over at the end of the microflow, then counting that list, and put an exclusive split behind that which checks if the counted variable >= the number of times you want to loop. If true, end the microflow, if false: start the microflow again using the 'call microflow' action.
I know that you cant loop in your micro-flow except for list of objects.
so I have an idea about this:
add one Entity per whole application (I call it Dummy-Counter which has one integer attribute called counter)
now you need to fill or initialize Dummy-Counter just one time by max number of records that you may need by using recursive micro-flow (micro-flow call itself till you reach the max objects u need to fill).
now the Dummy-Counter Entity is filled for instance by 400 records
and lets say you want to loop over 365 (the no of days per year ) in any micro-flow in you application
, you will retrieve List of Dummy-Counter from database where the counter < or = 365.
I hope this may help.