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

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 III
Dual Super User III

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

Pstork1
Dual Super User III
Dual Super User III

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

Pstork1
Dual Super User III
Dual Super User III

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (35,259)