App object in Power Apps

Every app has an App object. The App object provides information about the currently running app and control over the app's behavior.

There are the following properties of the App object:

1. StartScreen property The StartScreen property determines which screen will be displayed first. It's evaluated once when the app is loaded and returns the screen object to be displayed. By default, this property will be empty, and the first screen in the power apps studio Tree view is shown first.
Let us write the name of the screen, Screen2 on the StartScreen property of the App object.

StartScreen property of App object in Power App

On the App object in the Tree view pane, selecting the ellipsis (...), and then selecting Navigate to StartScreen. The screen will change as if the app has been loaded.

StartScreen property of App object in Power App

Once we click, we reach to the Screen2.

StartScreen property of App object in Power App

We can also specify the power apps formula on this property to dynamically change the start screen.

PowerApps Formula

If(User().Email = “example@gmail.com”, StaffScreen, StudentScreen )

The above formula checks that if the logged in user has the email address “example@gmail.com”, then it will be redirected to the StaffScreen otherwise it will be redirected to the StudentScreen.

2. ActiveScreen property The ActiveScreen property identifies the screen that's showing. This property returns a screen object. The object has several properties. For example, we can extract the name of the screen by using the following powerapps formula.

PowerApps Formula

App.ActiveScreen.Name
ActiveScreen property of App object in Power App