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

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,434)