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

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,673)