How to Use If Condition in Power Apps Radio Button?

While working with the Power Apps form, I needed to disable the Power Apps dropdown when a user selects any value from a radio control. In this case, I used the Power Apps If statement, which helps to perform a logical comparison to determine whether the result is actual.

In this article, I will explain how to use If condition in Power Apps Radio button, along with the examples below:

  • Navigate to a Power Apps screen based on the radio button selection
  • Show text based on Power Apps radio selected value
  • Disable the Power Apps Dropdown control if the radio button is selected

Navigate to a Power Apps Screen based on the Radio button selection

Let’s see how to navigate to a Power Apps screen when a user selects any values from the radio button control.

Navigate the Power Apps screen using Radio button

Follow the instructions below:

1. I have a SharePoint list [Training Courses] that has various columns like:

Column NameData type
Course NameTitle
TechnologyChoice [“Power Apps,” “Power Bi,” “Power Automate,” “SharePoint”]
Course Start DateDate and time
Course End DateDate and time
ImageImage
Power Apps Radio button control If Statement

2. I added a Radio button control on the Power Apps screen and retrieved the choice values [Technology] from the SharePoint list.

Radio button: Items = Choices([@'Training Courses'].Technology)

Where,

  1. ‘Training Courses’ = SharePoint Online List
  2. Technology = SharePoint Choice Field
How to Use If Statement in the Power Apps Radio Button Control

3. Then, set the Radio button OnSelect property to the code below:

If(
    !IsBlank(Radio_TrainingCourses.Selected.Value),
    Navigate(CoursesDetailsScreen)
)

Where,

  1. Radio_TrainingCourses = Power Apps Radio control name
  2. CoursesDetailsScreen = Provide the Power Apps screen name that you want to navigate
Power Apps Radio Button Choices Using If statement

4. Save, Publish, and Preview the app. When a user selects any value from the Power Apps Radio button, it will navigate to the specific screen [CoursesDetailsScreen], as in the screenshot below.

Power Apps Radio Button Control Choices Using If Statement

This way, we can navigate the Power Apps screen based on the selected values of the Power Apps radio control.

Display Text Based on Power Apps Radio Selected Value

In this scenario, we will see how to show text according to the user radio selected value in Power Apps.

1. I have a SharePoint list [OTT Platform] that has various columns like:

Column NameData type
OTT Platform NameTitle
Subscription PlanChoice [“Standard,” “Premium”]
PriceCurrency
Power Apps Radio button control using If Statement

2. On my Power Apps screen, I added an Edit form control connected to the SharePoint list [OTT Platforms].

Whenever the user selects any Subscription plan, e.g., [Standard and Premium], from the Power Apps Radio button, the Price will show according to the selected subscription plan.

Power Apps Radio Button Using If Condition On Edit Form

3. Select the Price text field and set its Default property to the code below:

If(
    DataCardValue1.Text = "Netflix" && Radio_Plans.Selected.Value = "Premium",
    "$500",
    DataCardValue1.Text = "Amazon Prime Video" && Radio_Plans.Selected.Value = "Standard",
    "$300",
    DataCardValue1.Text = "Disney+" && Radio_Plans.Selected.Value = "Premium",
    "$700"
)

Where,

  • DataCardValue1 = Text input control name of OTT Platform Name
  • “Netflix,” “Amazon Prime Video,” “Disney+” = SharePoint Text Field Values
  • Radio_Plans = Power Apps Radio Button Name
  • “$500,” “$300,” “$700” = Provide some prices
How to use a Power Apps Radio Button If Condition on Edit Form

4. Save, Publish, and Preview the app. When a user provides an OTT Platform Name and selects any subscription plan, the price will display according to the radio selection.

If Condition in Power Apps Radio Button

This way, we can display text based on the selected value of Power Apps radio control.

Disable Power Apps Dropdown control if Radio button is selected

Suppose there is a Power Apps Radio button control (Yes/No Values) and a Dropdown control. When a user selects either Yes or No from the radio control, the dropdown control will be disabled. If the radio control is unselected, the dropdown will be in edit mode as below.

Disable Power Apps Dropdown control if Radio button is selected

To work around this, select the Dropdown control and apply the code below on its DisplayMode property as:

DisplayMode = If(
    rdYesNo.Selected.Value = "Yes",
    DisplayMode.Disabled,
    rdYesNo.Selected.Value = "No",
    DisplayMode.Disabled,
    DisplayMode.Edit
)

Where,

rdYesNo = Radio control name

How to use If condition in Power Apps Radio button

Save and preview the app. If you select Yes or No from the radio control, the dropdown control will be disabled.

Additionally, you may like some more Power Apps tutorials:

I hope this article helped you understand how to use if condition in a Power Apps Radio button control with various scenarios.

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…