Have you ever worked with Power Apps Button OnSelect? If not, follow this Microsoft Power Apps tutorial to learn an overview of Power Apps Button OnSelect and how to work with Power Apps Button OnSelect.
Also, we will discuss some more topics below with various examples:
- Power Apps Button OnSelect Change Text
- Power Apps Button OnSelect Navigate Screen
- Power Apps Button OnSelect Open URL
- Power Apps Button OnSelect Change Color
Overview of Power Apps Button OnSelect
1. Power Apps Button OnSelect is a Property that helps to do some actions when the user taps/clicks on it. For example, when a user clicks on the Button, it will be disabled like below:

2. Power Apps Button OnSelect can be found on the menu buttons, where navigation is needed to move other screens.
3. Power Apps Button OnSelect property is needed for when you want your button to do something; add your code to trigger an action in Power Apps.
4. Instead of coding, we can’t do anything in the Power Apps Button OnSelect. And it runs one or more functionalities when the user clicks or taps the Button control.
Power Apps Button OnSelect Examples
Let us see how to add actions in the Power Apps Button OnSelect. Such as:
- Power Apps Button OnSelect Change Text
- Power Apps Button OnSelect Navigate Screen
- Power Apps Button OnSelect Open URL
- Power Apps Button OnSelect Change Color
Power Apps Button OnSelect Change Text
Suppose you want to change the Text in the Power Apps Button OnSelect, then follow the below steps:
1. Click on the Button control, rename the Text (Save), and set its OnSelect property to the code below:
OnSelect = Set(gblClicked,true)
Where,
- Set() = This Power Apps function is used to set the global variable to store a piece of information
- gblClicked = Power Apps Global Variable Name

2. Next, select the Text property to change the Button text (If the user wants to Save Again by the second click of the Save button). And set its Text property to the code below:
Text = If(
gblClicked,
"Save Again",
"Save"
)
3. Save, Publish, and Preview the app. When the user clicks on the button control, the text property will change as in the screenshot below.

This is all about the Power Apps button OnSelect change text.
Power Apps Button OnSelect Navigate Screen
Next, we will discuss the Power Apps button OnSelect to navigate the screen. To do so, follow the below steps are:
1. Click on the Button control, and rename the text (Go to screen). Next, set its OnSelect property to the code below:
OnSelect = Navigate('Success Screen')
Where,
- Navigate() = This function can be used to redirect to other screens
- ‘Success Screen’ = Name of the other screen

2. Save, Publish, and Preview the app. Once the user clicks on the Navigate button, it will redirect to the other screen (Sucess Screen) like below:

This is how to use the navigate function in the Power Apps Button OnSelect.
Power Apps Button OnSelect Open URL
Let’s see how to open a URL in the Power Apps Button OnSelect. To do so, observe the below steps:
1. Click on the Button control, and rename the text (Go to URL). Next, set its OnSelect property to the code below:
OnSelect = Launch("https://xyz.sharepoint.com/sites/DutchCrafters")
Where,
- Launch = This function helps you to open links in your browser from the App
- “https://xyz.sharepoint.com/sites/DutchCrafters” = SharePoint Online Site URL address

2. Save, Publish, and Preview the app. Once the user clicks on the Navigate button, it will redirect to the respective SharePoint Online Site as in the screenshot below.

This is how to open a URL in the Power Apps Button OnSelect.
Power Apps Button OnSelect Change Color
In the last, we will see how to change color in the Power Apps Button OnSelect. To achieve this, follow the below steps:
1. Click on the Button control (Save), and set its OnSelect & Fill properties to the code below:
OnSelect = UpdateContext({togglevalue:!togglevalue})
Fill = If(togglevalue,Color.DarkRed,Color.AliceBlue)
Where,
- UpdateContext = This function is used to create a Power Apps context variable to store information
- togglevalue = Power Apps Context Variable Name.

2. Save, Publish, and Preview the app. Once the user clicks on the Button control, it will change the color to either DarkRed or AliceBlue, as in the screenshot below.

This is how to Change Color in the Power Apps Button OnSelect.
Conclusion
This Power Apps tutorial helps us to learn an overview of the Power Apps Button OnSelect. It is also covered below topics such as:
- Power Apps Button OnSelect Change Text
- Power Apps Button OnSelect Navigate Screen
- Power Apps Button OnSelect Open URL
- Power Apps Button OnSelect Change Color
Also, you may like some more Power Apps tutorials:
- Show or Hide Label Control On Button Click in Power Apps
- Power Apps Modern Button Control
- Power Apps Combo Box Control
- Display Column Names in Power Apps Dropdown
- Delegation Warning in Power Apps Combo box
- Submit Data From Power Apps to Excel

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.