How to Change Power Apps Toggle to Radio Button?

Can you change the Power Apps Toggle to the Radio button? Of course, Yes. This Power Apps tutorial will explain how to change Power Apps Toggle to Radio button.

Also, I will discuss how to convert the Toggle On/Off value to a Yes/No value in the Power Apps Radio button. Moreover, we will see how to change the value from toggle control to Radio control in the Power Apps Edit form.

Change a Toggle to a Radio Button in Power Apps

Here, I will take a simple scenario to change the Power Apps Toggle [On/Off] to the Radio Button [Yes/No] value. For that, follow the steps below:

  1. Set up a SharePoint list
  2. Create a blank Canvas app and add the SharePoint list data source connector
  3. Add Power Apps Edit Form and add the list data source
  4. Change the Power Apps Toggle control to the Radio button control
  5. Bind SharePoint Yes/No value in Power Apps Radio Button
  6. Save, Publish, and Preview the app

1. Set up a SharePoint list

  • I have a SharePoint Online list named “Travel Requests“. This list contains the below columns.
Column NameData Type
Trip Title This is a Title column with a single line of text. I just renamed it to “Trip Title”
DestinationLocation
Travel Start DateDate and time
Travel End DateDate and time
ApprovedYes/No
Change Power Apps Toggle to Radio Button

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.
Change the Power Apps Toggle control to the Radio button control
  • Once the Power Apps app is created, connect the SharePoint list, i.e., [Travel Requests], to the app. Once you connect, it will look like the screenshot below.
Change Power Apps Toggle Value to Radio Button Value

3. Add Power Apps Edit Form and add the list data source

  • On the Power Apps Screen, insert the Edit form and connect the DataSource as a SharePoint list [‘Travel Requests’].
  • Then, add the SharePoint list fields using the Edit Fields option as per the needs like below:
Change the Power Apps Toggle On Off value to Radio button Yes No value
  • 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.
Change Power Apps Toggle On Off value to Radio button Yes No value

4. Change the Power Apps Toggle control to the Radio button control

  • You can see here, in the Power Apps Edit form, the SharePoint Yes/No value as in Toggle control with On/Off value.
Change Power Apps Toggle control to Radio button control
  • Now, I don’t want to display the On/Off value in the Toggle control. I want to show the Yes/No value in the Radio button control.
  • Whenever the user opens the Power Apps Edit form control, it will display the SharePoint Yes/No field in the Radio button.
  • For that, select the Approved_DataCard1 -> Remove the Toggle button -> Insert a Radio button and set its Items property as:
Items = ["Yes", "No"]
How to Change Power Apps Toggle value to Radio button value

5. Bind SharePoint Yes/No value in Power Apps Radio Button

  • Next, Select the Approved_DataCard1 -> Set its Update property to the code below.
Update = If(
    Radio_Approved.Selected.Value = "Yes",
    true,
    false
)

Where,

  • If() = This Power Apps If() function to evaluate unrelated multiple conditions
  • Radio_Approved = Power Apps Radio Button Name
Bind SharePoint Yes No value in Power Apps Radio Button
  • In the last, insert a Save Icon -> Set its Visible property code to the below.
Visible = If(
    Radio_Approved.Selected.Value = "Yes",
    true,
    false
)

Where,

  • Radio_Approved.Selected.Value= “Yes”,true,false = If Power Apps Radio button selected value is “Yes”, then only Button control will be appear
How to Bind SharePoint Yes No value in Power Apps Radio Button
  • Also, set the Save icon OnSelect property as:
OnSelect = SubmitForm(frm_NewTravelRequest);
ResetForm(frm_NewTravelRequest)

Where,

  • SubmitForm() = Use this function to save any changes in the Edit form control to the respective data source
  • frm_NewTravelRequest = Power Apps Edit Form Name
  • ResetForm() = This Function resets the contents of a form to their initial values
How to Bind a SharePoint Yes No value in Power Apps Radio Button

6. 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 the Approved value as “Yes” in the Power Apps Radio button. Then, only the user will get the Save icon, or else it will be in disappear mode.
  • Once click on the Save icon, the new record will be added to the SharePoint list.

Refer to the below screenshot:

Bind a SharePoint Yes No value in Power Apps Radio Button

This is all about how to change the Power Apps Toggle On/Off value to the Radio button Yes/No value.

Conclusion

This Power Apps tutorial taught us how to change a Toggle value to a Radio button value in Power Apps.

Here, we discussed converting the Toggle On/Off value to a Yes/No value in the Power Apps Radio button. Also, we covered how to change the value from toggle control to Radio control in the Power Apps Edit form using an example.

You may also like: