cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Trying to use Time to navigate to home screen

I have a button that when pressed executes a Microsoft Flow. In the flow I call a stored procedure to update the on-prem database, create an Outlook Calendar event then send an email. I would like to navigate back to the home screen after the workflow has processed. When the home screen loads the records in the gallery should reduce by one. They do not so I tried doing a ClearCollect on the datasource but that does not work as the ClearCollect is firing before the database has been updated therefore showing the same amount of records. So I thought I would try using a timer control that would navigate back to the home page after 5 seconds but the timer is not firing when I click the button. I have OnSelect(Time1.Start). And for the OnEndTimer event I have Navigate(Home)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Trying to use Time to navigate to home screen

You can use the following properties on your screen:

Button1.OnSelect: UpdateContext({timerStart:true})
Timer1.Duration: 5000
Timer1.Start: timerStart
Timer1.OnTimerEnd: UpdateContext({timerStart:false}); Navigate(Home, ScreenTransition.Cover)

When the button is selected, it sets the 'timerStart' variable to true, which will cause it to start. When the timer ends (after the 5 seconds), it will reset the 'timerStart' variable (so that the timer can be started again later), then navigates to the home screen.

View solution in original post

1 REPLY 1
Highlighted
Power Apps
Power Apps

Re: Trying to use Time to navigate to home screen

You can use the following properties on your screen:

Button1.OnSelect: UpdateContext({timerStart:true})
Timer1.Duration: 5000
Timer1.Start: timerStart
Timer1.OnTimerEnd: UpdateContext({timerStart:false}); Navigate(Home, ScreenTransition.Cover)

When the button is selected, it sets the 'timerStart' variable to true, which will cause it to start. When the timer ends (after the 5 seconds), it will reset the 'timerStart' variable (so that the timer can be started again later), then navigates to the home screen.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,266)