This Power Apps tutorial will teach us about the Power Apps OnStart Property. Then, We will discuss how to use app OnStart function in Power Apps.
Moreover, we will discuss how to use the StartScreen property in Power Apps and set the global variable in Power Apps OnStart property.
Also, we will create a Power Apps collection using the Power Apps OnStart property by taking a simple scenario.
Power Apps OnStart Property
- Power Apps OnStart Property runs when the user starts a Power Apps app.
- The OnStart property in Power Apps is broadly used to initialize a global variable, cache, or retrieve data from the collection.
- Microsoft recently announced that the “Navigate()” function in the Power Apps OnStart property is deprecated. To resolve it, you should use a new property named “StartScreen“.
- Previously, when we used the Navigate() function in the Power Apps OnStart property, the app would be loaded very slowly to show the screen until all the code logic was executed successfully.
Note:
Power Apps OnStart property may be disabled by default depending on your performance reasons. If you want use it then, check the App’s “Advanced settings” for a switch to enable it.

How to Use App OnStart Function in Power Apps
Here, we will discuss how to use the OnStart property in Power Apps.
- For example, I have created a Power Apps Canvas app. Inside this app, I have added three different screens, i.e.,
- WelcomeScreen
- EmployeeRegistrationScreen
- SuccessScreen




- Whenever we run a Power Apps app, it will always start with the default/first screen. I want to run the app with the second screen [EmployeeRegistrationScreen] by using a Navigate() function in the OnStart property.
- But, unfortunately, I will get an error message, i.e., [Navigation is not permitted in OnStart. Use the StartScreen instead] like below.

- To resolve this problem, I have used the “StartScreen” property to navigate the second screen. Now, whenever I start or run an app, it gives a second screen, as shown below.

To work around the above example, follow the below-mentioned steps. Such as:
- Open your Power Apps with respective Microsoft credentials -> Create a Canvas app where you want to add different screens -> Click on the App object [From left navigation] -> Select StartScreen and set its property code like below.
StartScreen = EmployeeRegistrationScreen
Where,
- EmployeeRegistrationScreen = Second Screen

- Then, click on the App object -> Select More commands (…) option -> Click on the Navigate to StartScreen button.
- Next, Save and Publish the app -> Click on the Apps section -> Select the respective Canvas app [Power Apps OnStart Property] -> Click on the Play icon under the More command (…) option like below.

- Once you select the Play icon, it will run with the second screen, as shown below.

This is how to use the OnStart property in Power Apps.
Power Apps Set Global Variable OnStart
Let us see how to set global variables using Power Apps OnStart property.
- For example, I have created a table using a global variable [gvProducts] on the Power Apps OnStart property. There are five columns in the table:
- ProductName
- Category
- Price
- Color
- Quantity
Refer to the below table:
ProductName | Category | Price | Color | Quantity |
Office Chair | Office | 1500 | Brown | 5 |
Dining Table | Home | 1000 | Red | 10 |
Baby Furniture | Children | 900 | Blue | 15 |
Bowls and Feeders | Pet Furniture | 1000 | White | 25 |

To achieve the above example, follow the below steps.
- On the Power Apps Screen -> Click on the App object [From left navigation] -> Select OnStart and set its property code like below.
OnStart = Set(
gvProducts,
Table(
{
ProductName: "Office Chair",
Price: 1500,
Category: "Office",
Quantity: 5,
Color: "Brown"
},
{
ProductName: "Dining Tabel",
Price: 1000,
Category: "Home",
Quantity: 10,
Color: "Red"
},
{
ProductName: "Baby Furniture",
Price: 900,
Category: "Children",
Quantity: 15,
Color: "Blue"
},
{
ProductName: "Bowls and Feeders",
Price: 1000,
Category: "Pet Furniture",
Quantity: 25,
Color: "White"
}
)
)
Where,
- gvProducts = Global variable Name
- ProductName, Price, Category, Quantity, Color = Table Headers/ Columns
- “Office Chair”, 1500, “Office”, 5, “Brown” = Table Values/ Rows

- Next, click on the More commands (…) option and click on the Run OnStart option to get our global variable.
- Then, go to the Variables section (x) -> Select Global Variables drop-down to find the product table like below.

- Also, if you want to see your created global variable, i.e., [gvProducts] then, click the View Table option to view all the records as shown below.

This is how to set a global variable using the Power Apps OnStart property.
Create a Collection Using Power Apps OnStart Property
Now, we will discuss creating a collection using the Power Apps OnStart property.
- Suppose I have created a Power Apps collection, i.e., [AirlineCollection] using the OnStart property. There are two columns in the table:
- AirlineName
- EstimatedAirfare
Refer to the below table:
AirlineName | EstimatedAirfare |
Alaska Air | $167,791 |
Southwest | $99.7 |
British Airways | $28,365 |
Emirates | $13,437 |

To work around the above example, follow the below steps.
- On the Power Apps Screen -> Click on the App object [From left navigation] -> Select OnStart and set its property code like below.
OnStart = ClearCollect(
AirlineCollection,
{
AirlineName: "Alaska Air",
'EstimatedAirfare': "$167,791"
},
{
AirlineName: "Southwest",
'EstimatedAirfare': "$99.7"
},
{
AirlineName: "British Airways",
'EstimatedAirfare': "$28,365"
},
{
AirlineName: "Emirates",
'EstimatedAirfare': "$13,437"
}
)
Where,
- AirlineCollection = Collection name
- AirlineName, Estimated Airfare = Table Headers/ Columns
- “Alaska Air”, “$167,791” = Table Rows/ Records

- Next, click on the More commands (…) option and click on the Run OnStart option to get our collection.
- Then, go to the Variables section (x) -> Select Collection drop-down to find the collection table like below.

- Also, if you want to see your created collection, i.e., [AirlineCollection], click the View Table option to view all the records below.

This is how to add a collection using the Power Apps OnStart property.
Also, you may like some more Power Apps tutorials:
- Create Power Apps Collection from SharePoint List
- Power Apps Filter Gallery By Date
- How to Remove Items from a Power Apps Collection?
Conclusion
This Microsoft Power Apps tutorial taught us about the Power Apps OnStart property. Then, we discussed how to use the OnStart property in Power Apps.
Also, we learned why the Navigate() expression is deprecated in a Power Apps OnSatart property and how to use the StartScreen property in Power Apps.
Finally, we covered how to set global variables in the Power Apps OnStart property and create a Power Apps collection using the Power Apps OnStart property.

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.