cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

One-off welcome screen

I'm wanting to add a welcome screen to my app so that the first time a user opens the app they will be greeted with the 'Welcome Screen' but everytime they use the app after that I don't want the screen to show up.

 

Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: One-off welcome screen

It is not possible to completely skip a first screen on all times the user opens the app except from the first time. But you can have a logic that if the user has seen that screen at least once, then the app will navigate to the second page. You'll still briefly see the first screen while the logic is running, but the user will quickly be moved to the second screen.

 

To do that, you'll still need a timer - there's a limitation in PowerApps where you cannot call the Navigate function in a screen's OnVisible action handler. What I've done in the past is to, in the first screen OnVisible, set a context variable that controls a timer with a very short duration, and on the timer's end action, then you can navigate to the next page.

 

To make sure that the "automatic" navigation to the second page is only done after the first time the user saw the app, you can use the SaveData/LoadData functions to store this information locally.

 

Here are the steps for that. In the first screen, add a timer control with the following properties:

Duration: 10
Start: shouldNavigate
Visible: false
OnTimerEnd: Navigate(Screen2, ScreenTransition.Fade)

The duration can be any small number (remember that its value is in milliseconds). The 'shouldNavigate' context variable used in the Start property will be set in the screen's OnVisible property.

 

Now for the screen. The only property that needs to be set for this logic to work is the OnVisible:

OnVisible: LoadData(coll, "firstusage");
           UpdateContext({shouldNavigate: false});
           If(First(coll).skipSplashScreen, UpdateContext({shouldNavigate: true}));
           ClearCollect(coll, {skipSplashScreen: true});
           SaveData(coll, "firstusage")

The first line in the OnVisible's formula will try to load a saved file (called "firstusage") into a collection (coll). If it's indeed the first usage of the app, then that file will not exist, and the remaining commands will not be executed, therefore the user will be presented with the first screen.

 

If the file exists, we first reset the 'shouldNavigate' context variable - line 2.

 

Then, if the first (and only) element of the collection that was read from the file has a property 'skipSplashScreen' set to true, we'll update the 'shouldNavigate' context variable to true, which will trigger the timer to start (and cause the navigation to the next screen) - line 3.

 

Next, we clear the collection and add one single element to it, with the 'skipSplashScreen' set to true, and save the file. That way, the next time the user navigates to this screen (for example, when they open the app again), the file will exist, and the timer will be triggered to auto-navigate the user to the second screen.

 

That should be enough to implement your "first-time-only-splash-screen" functionality. Granted, it's not ideal (as the splash screen will still flash momentarily on subsequent runs of the app), but the user will be taken to the second screen.

 

A note on this technique: once you save the file with the 'skipSplashScreen' to true, every time you go to the first (splash) screen, even while authoring, you will get navigated to the second screen. I like to have a "hidden" screen (one that isn't navigated to by any other screens in the app) with a "reset" button. That can be implemented by adding a button to this hidden screen, and set its OnSelect property as follows:

OnSelect: ClearCollect(coll, {skipSplashScreen:false}); SaveData(coll, "firstusage")

This way, if you're authoring the app, you can go to that page (via the navigation thumbnails) and reset the first usage flag, and then go to the first page to edit your splash screen.

 

Hope this helps!

 

View solution in original post

4 REPLIES 4
Highlighted
Advocate III
Advocate III

Re: One-off welcome screen

Sure, I guess you can put a timer that starts when the welcome screen showed up and the duration is whatever you want, when the timer finished you can set in "OnTimerEnd" to Navigate to your Main screen of your application.

 

 

Highlighted
Anonymous
Not applicable

Re: One-off welcome screen

Hi @Brank,

 

Thanks for the reply but not quite what I'm looking for. I only want the welcome screen to show up once, period.

 

Basically the first time a user ever uses the app it will greet them with a welcome screen but each subsequent time after that the welcome screen will never appear.

 

From what I've learnt so far I doubt this is possible but someone with more knowledge than me may be able to give me a definitive answer.

Highlighted
Power Apps
Power Apps

Re: One-off welcome screen

It is not possible to completely skip a first screen on all times the user opens the app except from the first time. But you can have a logic that if the user has seen that screen at least once, then the app will navigate to the second page. You'll still briefly see the first screen while the logic is running, but the user will quickly be moved to the second screen.

 

To do that, you'll still need a timer - there's a limitation in PowerApps where you cannot call the Navigate function in a screen's OnVisible action handler. What I've done in the past is to, in the first screen OnVisible, set a context variable that controls a timer with a very short duration, and on the timer's end action, then you can navigate to the next page.

 

To make sure that the "automatic" navigation to the second page is only done after the first time the user saw the app, you can use the SaveData/LoadData functions to store this information locally.

 

Here are the steps for that. In the first screen, add a timer control with the following properties:

Duration: 10
Start: shouldNavigate
Visible: false
OnTimerEnd: Navigate(Screen2, ScreenTransition.Fade)

The duration can be any small number (remember that its value is in milliseconds). The 'shouldNavigate' context variable used in the Start property will be set in the screen's OnVisible property.

 

Now for the screen. The only property that needs to be set for this logic to work is the OnVisible:

OnVisible: LoadData(coll, "firstusage");
           UpdateContext({shouldNavigate: false});
           If(First(coll).skipSplashScreen, UpdateContext({shouldNavigate: true}));
           ClearCollect(coll, {skipSplashScreen: true});
           SaveData(coll, "firstusage")

The first line in the OnVisible's formula will try to load a saved file (called "firstusage") into a collection (coll). If it's indeed the first usage of the app, then that file will not exist, and the remaining commands will not be executed, therefore the user will be presented with the first screen.

 

If the file exists, we first reset the 'shouldNavigate' context variable - line 2.

 

Then, if the first (and only) element of the collection that was read from the file has a property 'skipSplashScreen' set to true, we'll update the 'shouldNavigate' context variable to true, which will trigger the timer to start (and cause the navigation to the next screen) - line 3.

 

Next, we clear the collection and add one single element to it, with the 'skipSplashScreen' set to true, and save the file. That way, the next time the user navigates to this screen (for example, when they open the app again), the file will exist, and the timer will be triggered to auto-navigate the user to the second screen.

 

That should be enough to implement your "first-time-only-splash-screen" functionality. Granted, it's not ideal (as the splash screen will still flash momentarily on subsequent runs of the app), but the user will be taken to the second screen.

 

A note on this technique: once you save the file with the 'skipSplashScreen' to true, every time you go to the first (splash) screen, even while authoring, you will get navigated to the second screen. I like to have a "hidden" screen (one that isn't navigated to by any other screens in the app) with a "reset" button. That can be implemented by adding a button to this hidden screen, and set its OnSelect property as follows:

OnSelect: ClearCollect(coll, {skipSplashScreen:false}); SaveData(coll, "firstusage")

This way, if you're authoring the app, you can go to that page (via the navigation thumbnails) and reset the first usage flag, and then go to the first page to edit your splash screen.

 

Hope this helps!

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: One-off welcome screen

Hi @CarlosFigueira,

 

Thanks for the quick reply and great explaination! I will give this a go and get back to you if I have any issues 🙂

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

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 (9,418)