cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jehrenfeld 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
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
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (5,072)