Do you know how to convert dropdown to radio button in Power Apps form? If not, no need to worry!
This Microsoft Power Apps tutorial will teach how to convert a Dropdown control to a Radio button control in Power Apps form.
Also, we will discuss how to change the value from Dropdown control to Radio control in the Power Apps Edit form.
Convert Power Apps Dropdown To Radio Button
Here, I will take a simple scenario to convert the Power Apps Dropdown to a Radio button. For that, follow the steps below:
- Set up a SharePoint Online list
- Create a blank Canvas app and add the SharePoint list data source connector
- Add Power Apps Edit Form and add list as a data source
- Convert the Power Apps Dropdown control to the Radio button control
- Save, Publish, and Preview the app
1. Set up a SharePoint Online list
- I have a SharePoint Online list, i.e., [Vacation Budget]. This list contains the below steps.
|Column Name||Data Type|
|Destination||It is a default single line of text, I just renamed it as “Destination”|
|Expense Name||A single line of text|
2. Create a blank Canvas app and add the SharePoint list data source connector
- Open Power Apps -> Create a blank canvas app -> Provide the App name, and by default, it will Format as Tablet, and click on the Create button.
- Once the Power Apps app is created, connect the SharePoint list [Vacation Budget] to the app. Once you connect, it will look like the screenshot below.
3. Add Power Apps Edit Form and add list as a data source
- On the Power Apps Screen, insert the Edit form and connect the DataSource as a SharePoint list [‘Vacation Budget’].
- Then, add the SharePoint list fields using the Edit Fields option as per the needs like below:
- Also, remember that whenever you want to add a new record from Power Apps to the SharePoint list, you should change Power Apps Form Default mode to “New” as shown below.
4. Convert the Power Apps Dropdown control to the Radio button control
- Here, we can see that the SharePoint choice field values are displayed on the Dropdown control.
- Now, I don’t want to display the choice field in the Dropdown control. I want to display the choice field values on the Radio button control.
- For that, select the ‘Category_DataCard1’ -> Select Dropdown control -> Copy the DataCardValue and Items property -> Remove the Dropdown control.
- Next, insert a Radio button control -> Set its DataCardValue and Items property from the Dropdown control as shown below.
Items = Choices([@'Vacation Budget'].Category)
- ‘Vacation Budget’ = SharePoint Online List
- Category = SharePoint Choice Field
- In the last, insert a Save icon and set its OnSelect property to the code below:
OnSelect = SubmitForm(frm_NewVacation); ResetForm(frm_NewVacation)
- SubmitForm() = Use this function to save any changes in the Edit form control to the respective data source
- frm_NewVacation = Power Apps Edit Form Name
- ResetForm() = This Function resets the contents of a form to their initial values
- Also, set the Save icon’s Visible property code to the below.
Visible = If( Radio_Category.Selected.Value = Blank(), false, true )
- Radio_Category = Power Apps Radio Button Name
5. Save, Publish, and Preview the app
- Once your Power Apps app is ready, Save, Publish, and Preview the app.
- Whenever a user enters a new record, make sure he/she selects any value from the Power Apps Radio button control. Then, only the user will get the Save icon, or else it will be in disappear mode.
Refer to the below image:
- Once click on the Save icon, the new record will be added to the SharePoint list, as in the screenshot below.
This is how to convert a Power Apps Dropdown control to the Radio button control.
From this Power Apps tutorial, we learned all about how to convert a dropdown to a radio button in Power Apps form, like:
- Bind SharePoint list choice field values on the Power Apps Dropdown control using the Edit form
- How to convert the Dropdown control to a Radio button control in the Power Apps.
You may like the following tutorials:
- Get Radio Button Selected Value in Power Apps
- Change the Radio Button Layout from Vertical to Horizontal in Power Apps
- How to Set Power Apps Dropdown Values Based on Variable?
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.