web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Do until flow setup

(0) ShareShare
ReportReport
Posted on by 319

Hi,

 

I just wanted to formulate the below process flow into a do until loop . Is it possible by putting in a delay function along with the loop ? I want to send out email notification after every 1, 2 and 7 days.

 

Capture.PNG

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @Prathameshpatka,

     

    It is possible to set the dynamic delay time. 

    You could store these numbers of delay days into an array variable, then initialize an integer variable named Index and default value is 0.

    Screenshot 2020-09-29 160256.jpg

     

    Then create a Do until, set it stop condition to visit Complete is not equals to blank or set visit complete equals yes or something you set. To make the delay time dynamical, the Count field should be the expression:

    variables('DelayDays')[variables('Index')]

    Screenshot 2020-09-29 160334.jpg

     After one delay over, increase the Index 1 to for the next delay time.

    One point we need to do is set the Timeout of Do until action greater than 10 days, I set it to 12 days: P12D.

    ISO 8601 duration format 

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Prathameshpatka Profile Picture
    319 on at

    Thanks for you reply.

     

    Basically the 'Site visit Complete' holds a value yes or no. So in my case I want to compare the date in 'Date of site visit' with the current date and then after every 1,2 and 7 days need to send a reminder. Is that possible as the array and delay loop suggested by you ?

  • v-litu-msft Profile Picture
    on at

    Hi @Prathameshpatka,

     

    Yes, it is possible, if the trigger condition is each visit, the do until will keep running.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Prathameshpatka Profile Picture
    319 on at

    Hi,

     

    I did this on the do until flow where in the condition says that till the date site visit 

    formatDateTime(outputs('Date_of_visit'), 'yyyy-MM-dd') is less than or equal to
    formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd') that is till 7 days then for each 1, 2 and 7 days an email should be triggered.
     
    The array delay days was saved in the variable in the delay count field as
    variables('DelayDays')[variables('Index')]
     
    Should this flow work fine ?

     

    Capture.PNG

  • v-litu-msft Profile Picture
    on at

    Hi @Prathameshpatka,

     

    Yes, it could work, but 'Date_of_visit' action should be in Do until.

    Screenshot 2020-10-01 164602.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Prathameshpatka Profile Picture
    319 on at

    Hi,

     

    Does the below flow look fine now ?

     

    Capture.PNG

  • v-litu-msft Profile Picture
    on at

    Hi @Prathameshpatka,

     

    The Get item action should also add to the DO until action.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard