Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

How can I make it mandatory to select one of three buttons



I am trying to ensure that when filling in a form the candidate selects one of the three status buttons before submitting.


I currently have a condition on the 'Submit' button that if a certain field is blank it will bring a pop-up saying invalid entry (which functions as desired, see below). So I want to add a condition for if none of the 'status' buttons are selected you can't submit, I have added the following code but this does not work.






Any advise would be helpful, I can't seem to find much on line about if buttons are not selected.




Super User
Super User

Re: How can I make it mandatory to select one of three buttons

Since you are using buttons the easiest way to do this would be to add something like this to the OnStart method of the App


The add something to the OnSelect method of each button that sets the variable 


Then check the the value of StatusSet to enable or disable the Submit button for the form by adding the following to the DisplayMode property of the Submit button


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Level 8

Re: How can I make it mandatory to select one of three buttons

@Pstork1 Pstork1 made an excellent recommendation. You will also want to consider how you will reset your global variable. When the screen is re-displayed, the global status variable will need to be reset to false. When you have the initialization in the OnStart property, this initialization can only happen once as the OnStart commands are only executed one time, when the program begins. A good place to reset the global status variable to false is in the OnSelect property of the buttons.


It may also not be necessary to use a global variable. A context variable will work fine.

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.


PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!


Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 41 members 3,978 guests
Please welcome our newest community members: