How to Let the User Set Start Screen Dynamically in PowerApps

Often there are times where you want to give the user an option to save their selections from a start screen so that they do not have to make the same selections every time they use the app. In this post I will show you how to let the user set start screen dynamically in PowerApps. See demo app screens below.

Let the User Set Start Screen Dynamically in PowerApps Animation.

To create the demo we will use three screens. If the user has not saved default setting they will see the selection screen first. If the user previously saved their defaults they will be navigated straight to the “Tutorial Selected” screen. The splash screen is the first screen in the app and is used to collect the user defaults to determine which screen to send them to. So let’s get to it!

  • Insert 3 Screens and name them:
    • ScreenSplash
    • ScreenUserSelection
    • ScreenSelected

Now in the “ScreenSplash

Let the User Set Start Screen Dynamically in PowerApps splash screen.
  • ScreenSplash:
    • OnStart:// Get Users email
      Set(
      glUserEmail,
      User().Email
      );
      // Collect user preferences from table source.
      ClearCollect(
      colUserPref,
      Filter(
      ‘[dbo].[tbl_OPU_Demo]’,
      theUser = glUserEmail
      )
      );
      // Assign user preferences and ID to global variables
      Set(
      glUserTool,
      First(colUserPref).ToolChoice
      );
      Set(
      glUserSkillLevel,
      First(colUserPref).SkillLevel
      );
      Set(
      glID,
      First(colUserPref).ID
      );
      // Check if a record exists and update flags.
      If(
      CountRows(colUserPref) > 0,
      Set(
      glDefault,
      true
      );
      Set(
      glUserPrevSavedDefaults,
      true
      ),
      Set(
      glDefault,
      false
      );
      Set(
      glUserPrevSavedDefaults,
      false
      )
      );
      // Start the timer control
      Set(
      glStartTimer,
      true
      )
  • Insert a Timer Control
    • OnTimerEnd:
      If(
      glUserPrevSavedDefaults = true,
      Navigate(ScreenSelected),
      Navigate(ScreenUserSelection)
      );
      Set(
      glStartTimer,
      false
      )
    • AutoStart: glStartTimer
    • Duration: 1

Now in the “ScreenUserSelection

Let the User Set Start Screen Dynamically in PowerApps choose screen.

Insert the following controls and set the properties as follows:

  • Drop down
    • Name: DropDownTool
    • Items: [“PowerApps”,”Power BI”,”Flow”,”SharePoint”,”Teams”]
  • Drop down
    • Name: DropdownSkillLevel
    • Items: [“Beginner”,”Intermediate”,”Advanced”,”Power User”]
  • Check Box
    • Name: CheckboxDefault
    • Default: glDefault
    • OnCheck: Set(glDefault,true)
    • OnUnCheck: Set(glDefault,false)
  • Button
    • OnSelect:
      Set(
      glUserTool,
      DropdownTool.Selected.Value
      );
      Set(
      glUserSkillLevel,
      DropdownSkillLevel.Selected.Value
      );
      If(
      glDefault = true && glUserPrevSavedDefaults = true,
      UpdateIf(
      colUserPref,
      ID = glID,
      {
      SkillLevel: glUserSkillLevel,
      ToolChoice: glUserTool
      }
      );
      Patch(
      ‘[dbo].[tbl_OPU_Demo]’,
      colUserPref
      ),
      If(
      glDefault = true && glUserPrevSavedDefaults = false,
      Patch(
      ‘[dbo].[tbl_OPU_Demo]’,
      {
      SkillLevel: glUserSkillLevel,
      ToolChoice: glUserTool,
      theUser: glUserEmail
      }
      )
      )
      );
      Navigate(ScreenSelected)

Now in the “ScreenSelection

Let the User Set Start Screen Dynamically in PowerApps screen selected.
  • Icon
    • Icon: Icon.ChevronLeft
    • OnSelect: Navigate(ScreenUserSelection)
  • Label
    • Text: “You have selected ” & DropdownTool.Selected.Value & ” Skill Level ” & DropdownSkillLevel.Selected.Value

You now know how to let the user set start screen dynamically in PowerApps. As you can see by giving the user the ability to save their default settings you can save them time and make your apps user friendly. For an additional technique read this post how-to-change-the-color-theme-in-powerapps-during-run-time.

Please leave your feedback. I hope this article has been helpful for you and bookmark this blog and check back often as new articles will be posted regularly.

Share the knowledge!

Paul Rodrigues

Business Analyst with 20 years of IT experience creating practical solutions. I love to automate business processes through the use of technology while making the end users work easier. My current favorite tools are Power Apps, Power BI and Power Automate. #PowerAddict

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *