cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krfajar
Helper IV
Helper IV

How to Create Loop based on Start Date

Hi All,
I newbie in Power Automate.
I have field Start Date and End Date, created as many months as input.

Example:

I have a Start Date = 04 May and End Date = 04 July

Then the billing will be made as many months as the input.

Billing 1 = 04 May (Start Date+7)

Billing 2 = 04 June (Start Date(04 June)+7))

Billing 3 = 04 July (Start Date(04 July)+7))

 

if my logic is like this how should I create it?

 

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

Use your list with the Start date and End date as the data source. Then create a recurrence flow that runs at whatever interval you want to use to check whether a bill should be sent or not.  In your case its probably either monthly or daily depending on whether the start dates are all the same day of the month. When the flow runs you will do a Get Items on the list. Then evaluate the start date to see if its less than UtcNow() and whether the billing has already been done (see comment in next sentence about last billing).  If it is then do the billing for that record and update the start date (or another field like last billing) to the current date.  Then the next time you start the flow do the same thing again and it will do billing for anything that is due that hasn't already been done.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 thanks for your response.

Please review my flow. Is this what you mean?

F2.9.1png.png

 

Thank you

Please break your screenshot up into multiple files.  The resolution on this one is too low to make out any details.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1  Please review

9.1.png

 

 

9.2.png

Yes that will run once a month.  But there isn't really enough detail to figure out what you are trying to do.  For example there are two loops that both run on value.  I assume one is from the first Get Items and the other is from the second but which is which?  Then you have a condition, but I can't see what's in the formula you are evaluating.  Its hard to tell what this flow is supposed to accomplish without a lot more of the details about the logic involved.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,631)