Working With RadioButton Control In Microsoft PowerApps

Introduction

 
Before reading this article, please go through the articles mentioned below.
In PowerApps, we can add the RadioButton control.
 
RadioButton
 
RadioButton enables the user to select a single option from a group of choices when paired with other RadioButton controls. When a user clicks on one RadioButton, it becomes checked and all other RadioButtons in the same group becomes unchecked.
 
Follow the steps, mentioned below to work with RadioButton in PowerApps.
 
Step 1
 
Log in to the PowerApps
 
After downloading PowerApps from the Windows store, we need a Microsoft-related organization’s Office 365 ID or (MSDN, Microsoft, Skype, Office 365, etc.,) to login with.
 
 
Step 2 Create a New App in PowerApp
 
After login, we can see the dashboard. Subsequently, we click on the New button.
 
 
Step 3
 
Choose the Blank app
 
 
Step 4
 
Designing the App
 
Now, let's start designing the app. On the left side, we can see the individual screens to add our data. On the right side, we see the list of layouts. On the top, we see the formula bar, where you can see the Properties of the screen, which are selected by you. On the right side, we see the Add DataSource to add the external DataSource.
 
 
Step 5 Drag and Drop the Radio Button Control
  1. Go to the Insert menu and drag the RadioButton tool.
     
     
  2. Drop the RadioButton tool on the screen.
     
     
  3. Rename the MyRadioBtn.
     
     
  4. Add the options.
Select the RadioButton and add the options for the RadioButton to the Item event.
 
 
Step 6
 
Drag and Drop the Shape Control Tool
 
If you select the options, the changes appear on the Shape.
  1. Go to the Insert menu, choose Icons, and drag the 5-point Star Shape.
     
     
  2. Draw the Shape control to the screen.
     
     
  3. Add the coding.
Select the Shape control and add the coding to the Fill event.
 
Coding
  1. If(MyRadioBtn.Selected.Value = "Red", RGBA(192, 0, 0, 1),  MyRadioBtn.Selected.Value ="Green", RGBA(0, 176, 80, 1),  MyRadioBtn.Selected.Value = "Blue", RGBA(0, 32, 96, 1)) 
 
Step 7 Run the app
 
 
Output 1
 
Main Screen looks as follows.
 
 
Output 2
 
Click on the Red Option.
 
 
Output 3
 
Click on the Green Option
 
 
Output 4
 
Click on the Blue Option.
 
 

Conclusion

 
I hope you understood how to add RadioButton control in Microsoft PowerApps and how to run it.


Similar Articles