
I need some help on creating a flow for this.
Given the following requirements:
Frequency - Number of records
Interval (In Years)
How do you generate Dataverse records based on that using an on-demand flow given that those fields are dynamic? I know for sure you can't use Delay as it only works for 30 days. I've used Do-Until to run until the number of records are met but I don't know how to distribute them over a given Interval.
Appreciate your thoughts.
Hi @mkxx96,
You could use a range function to create an array of the Frequency - number of records. Within an apply to each you can loop through those items and calculate the interval of the current item and add it to a new row.
Below is an example
1. A range function in the apply to each
range(1,triggerBody()['number'])
2. Multiply the current item with the frequency and add it to the current year to find the next interval year.
add(int(utcNow('yyyy')), mul(item(),triggerBody()['number_1']))