Use Timers to Automate Success Screens in PowerApps

PowerApps

I am not the biggest fan of Success screens but I have started adding them to a few apps I developed. Why? In the right app, a Success screen can add value.

For example, if I am developing an app where the end user will not receive any other confirmation of their interaction with the app? If so, a Success screen is great for letting the user know that a completed form was submitted and there is nothing further for the user to do.

On the other hand, if I was presented with a success screen after every email message I sent from a mail app, I will endure a lot of wasted time. So, success screens are not necessarily right for all apps.

The default Success Screen

Thankfully, PowerApps has a simple Success screen that easily added to any app. Unfortunately, I find the simple Success screen lacks some key features.

First, there are no navigation controls on the Success screen. Once a user arrives at this screen, the user is stuck there. The developer has to add a way to get away from the Success screen. A button to navigate to another screen seems to be a favorite tool amongst PowerApps citizen developers but I don’t like this idea. Buttons place the burden on the end user to navigate away from the Success screen but I prefer to transport users where they need to be, automatically.

Use a timer to automate Success Screen navigation

  1. On your Success screen, add a Timer control to the screen.
  2. Toggle the AutoStart property ON.
  3. Set the timer duration property. Note: the duration is in milliseconds. By default, the duration is 60,000ms, also known as 60 seconds. Shorten this duration, dramatically. No one wants to look at a Success screen for 60 seconds. I tend to set the duration to 3000ms (3 seconds), for this purpose.
  4. Set the OnTimerEnd property to navigate to your desired screen. For my app, I wanted to send the user to the Browse screen so I used the following code:

    Navigate(BrowseScreen1,ScreenTransition.Fade)
  5. Test the Success screen to be sure that navigation occurs when the timer duration time is reached.
  6. Hide the timer.
    • Go back to the Success screen.
    • Select the timer.
    • Toggle the Visible property OFF.

That’t it! You have an automated Success screen.

For good measure

Try displaying more information during different points in the timer’s duration.

In my example, below, my success screen only displays the text ‘Claiming Incident…‘ when the timer starts but after two seconds, the grouped circle check icon appears.

OnTimerStart
At specific timer duration

Use timer duration as a condition

It is quite easy to use a timer’s duration as a condition. For my example, I use the duration to set my grouped objects’ Visible property like this.

  1. Select the group.
  2. In the group’s Visible property, enter the following code:

    If(Timer2.Value>=2000,true,false)

    This means that the grouped objects become and remain visible when the timer’s value reaches 2000ms.

Done! Now you can also display different information at different times while your timer runs.

Did you enjoy this topic? Like it and I’ll share similar topics.