Power Apps Radio Button Yes No Value

In this Power Apps tutorial, I will explain the entire information about the Power Apps Radio button Yes No value.

Here, we will discuss how to add a Yes No value in the Power Apps Radio button control directly and how to bind the SharePoint Yes No field in the Power Apps Radio button.

Additionally, We will see how to filter the gallery using a Radio button Yes No value.

Power Apps Radio Button Yes/No Value [Manually]

Here, we will discuss how to set the Power Apps Radio button Yes No value directly using two scenarios.

Scenarios – 1:

1. I have a Power Apps Canvas app, and there is a Radio button control having the Yes/No value.

Refer to the below Radio button Items property code:

Items = ["Yes", "No"]
Power Apps Radio Button Yes No

2. Now, I want to display the Power Apps Button control [Get Your Job] based on the Radio button selected value [If the selected value is “Yes” then only it will appear. Or else it will disappear].

Power Apps Radio Button Yes No

3. To do so, set the Button control’s Visible property to the code below.

Visible = If(
    Radio1.Selected.Value = "Yes",
    true,
    false
)

Where,

  • Radio1 = Power Apps Radio Button Name
  • “Yes” = Radio button Value
Power Apps Radio Button Yes No Value

Scenario – 2:

1. In Power Apps, I have added a Radio button control and set the values [Yes/No] Manually, as in the screenshot below.

Set Power Apps Radio Button Yes No Value

2. Now, I want to display the Select and Cancel icons based on the Power Apps Radio Yes/No value.

Refer to the below image:

Radio Button Yes No Value in Power Apps

3. To achieve it, set the Select and Cancel icons’ Visible properties as:

Visible = If(
    Radio_Value.Selected.Value = "Yes",        //If Radio Button Value as "Yes"
    true,
    false
)

If(
    Radio_Value.Selected.Value = "No",        //If Radio Button Value as "No"
    true,
    false
)
Set a Power Apps Radio Button Yes No Value

This is how to set a Yes/No value in the Power Apps Radio button control.

Bind SharePoint Yes/No Field in Power Apps Radio Button

Next, we will see how to bind a SharePoint Yes/No field in the Power Apps Radio button with a simple scenario.

Scenario:

1. I have a SharePoint Online List named “Travel Requests“, this list contains the below fields.

Column NameData Type
Trip TitleIt is a default text column, I just renamed it as “Trip Title”
DestinationLocation
Travel Start DateDate and time
Travel End DateDate and time
ApprovedYes/No
How to bind SharePoint Yes No Field in Power Apps Radio Button

2. In Power Apps, There is a Radio button control and Gallery control. In the Radio button control, I retrieved yes/no field values from the SharePoint list using the below code.

Items = Distinct(
    'Travel Requests',
    Approved
)

Where,

  • ‘Travel Requests’ = SharePoint Online List
  • Approved = SharePoint List Yes/No Field
How to Retrieve SharePoint Yes No Field in Power Apps Radio Button

3. But the Radio button only takes the true/false values instead of yes/no values. Also, set the Gallery control’s Items property to display filtered records based on the Radio button selected value.

Items = Filter(
    'Travel Requests',
    Approved = Radio_ApprovedValues.Selected.Value
)

Where,

  • Radio_ApprovedValues = Power Apps Radio Button Name

Refer to the below screenshot:

How to bind a SharePoint Yes No Field in Power Apps Radio Button

4. However, it is not the right way to display the SharePoint yes/no field in the Power Apps Radio button control. To overcome this, follow the below solution.

Solution:

5. Select the respective Power Apps Radio button control and set its Items property to the code below.

Items = Distinct(
    'Travel Requests',
    If(
        Approved = true,
        "Yes",
        "No"
    )
)

Where,

  • If() = This function evaluates multiple unrelated conditions in Power Apps
  • Approved = SharePoint Yes/No Field
Retrieve SharePoint Yes No Field in Power Apps Radio Button

6. Then, select the Gallery control and set its Items property as:

Items = Filter(
    'Travel Requests',
    Approved = If(
        Radio_ApprovedValues.Selected.Value = "Yes",
        true,
        Radio_ApprovedValues.Selected.Value = "No",
        false
    )
)

Where,

  • Radio_ApprovedValues = Power Apps Radio Button Name
Retrieve SharePoint Yes No Field in the Power Apps Radio Button

7. Save, Publish, and Preview the app. The Power Apps Radio button will display the Yes/No field values.

8. Also, the Power Apps gallery will display the filtered records based on the selected Radio button value as in the screenshot below.

How to bind the SharePoint Yes No Field in Power Apps Radio Button

This is how to bind the SharePoint Yes/No field in the Power Apps Radio button and filter the gallery based on the Radio button selected value.

Conclusion

This Power Apps tutorial taught us how to set the Power Apps Radio button’s Yes/No value manually. I also covered changing the true false value from the Radio button to a yes or no value in Power Apps.

In addition, we learned how to use the Radio button value to filter the Power Apps gallery.

You may also like: