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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add a Wait/dela...
Power Apps
Unanswered

How to add a Wait/delay inside ForAll

(0) ShareShare
ReportReport
Posted on by 54

I am trying to send mails in PowerApps using a flow.

It will be for multiple users. There is a ForAll and inside that there is another ForAll.

Inside one of the ForAll I will  patch new records to a SharePoint list.

Then I call my flow to send emails to those records in that SharePoint list.

Once I send the emails I will delete all the records from that List.

Since my flow takes few seconds to run, but by the time it will run records of the Sharepoint list will be deleted.

What I am trying to achieve is how to add a delay between running the flow and deleting the records in the Sharepoint list inside ForAll.

 

Sample Code;

ForAll(

  XXXList,

  ForAll(

         XXXList2,

         If(conditon=true ,

             Patch(add new records to xxxList3);

         );

  );

  FlowSendEmails.Run();

 

 ***I want to add a wait/delay between running the flow and deleting records of the list 

  Delete( xxxList3);

);

 

 

 

 

Categories:
I have the same question (0)
  • 365-Assist Profile Picture
    2,324 Moderator on at

    Try adding a Delay to your Flows

    365Assist_0-1655854273148.png


    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • Naviya89 Profile Picture
    54 on at

    Adding a delay / delay until to the flow will not help as the data will be deleted in the SharePoint list after calling the flow in PowerApps. Sharepoint List's data will be deleted and updated inside the Forloop.

  • 365-Assist Profile Picture
    2,324 Moderator on at

    Oh sorry for the misunderstanding.

    You can put a timer in the Power App. Its a little bit of work. Shane Young shows you how in this video. PowerApps Timer Control - YouTube The functionality your probably looking for is at about the 12 minute mark of the video. 

    You also may want to hide some of the controls Shane shows.

     


    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • Nam1209 Profile Picture
    21 on at

    Hi mate @Naviya89 ,

     

    I was having the same issue and I have tried to modify the "Concurrency Control" in the Power App trigger in my flow.

    Enable it, reduce the number of run to 1 and it works well.

    Hope it helps

  • ChuckQ Profile Picture
    Microsoft Employee on at

    For posterity, you can pause the ForAll() processing of the current iteration by having your code do something (anything) with the return of the flow. This works inside and outside loops. Assume the value "output" is what you set up in a "Respond to PowerApps" action at the end of your flow. Processing will wait for your flow to return before resuming because the function it is in depends on its output.

    ForAll(

      XXXList,

      ForAll(

             XXXList2,

             If(conditon=true ,

                 Patch(add new records to xxxList3);

             );

      );

     Collect(colTemp, {junk:FlowSendEmails.Run().output});

      Delete( xxxList3);

    );

    Clear(colTemp);

  • David_RO Profile Picture
    17 on at

    Hello, not working for me :

     

    ForAll(
    DocListToAdd.AllItems;
    Collect(testcol;
    'MyFlow'.Run(6 parameters).result);;
    Notify("test");;
    Notify(Last(testcol).Value)
    );;

     

    it displays "test" directly, without waiting the end of the flow, and of course, the last notify doesn't display anything

     

    EDIT: well it was because the response action in Power Automates was flagged as asynchronous.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard