cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jehrenfeld
Level: Powered On

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 Staff CarlosFigueira
Power Apps Staff

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 Staff CarlosFigueira
Power Apps Staff

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,935)