Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ODk74oyNe8j7saNUeTMsev
Power Apps - Building Power Apps
Answered

One-off welcome screen

Like (2) ShareShare
ReportReport
Posted on 15 Feb 2017 02:14:25 by

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?

Categories:
  • Community Power Platform Member Profile Picture
    on 16 Feb 2017 at 00:51:18
    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 🙂

  • Verified answer
    CarlosFigueira Profile Picture
    on 15 Feb 2017 at 23:07:19
    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!

     

  • Community Power Platform Member Profile Picture
    on 15 Feb 2017 at 20:17:54
    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.

  • Brank Profile Picture
    149 on 15 Feb 2017 at 14:32:29
    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.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started