web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Several buttons to con...
Power Apps
Answered

Several buttons to control text input similar to Radio Buttons

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm Trying to figure out how to make 3 buttons control one text input and only allow input from 1 button (exactly like what a radio button control does). Here is what I have currently but it doesn't clear the previous buttons entry. For example: if I click yes, but then change my mind and press No, both the text Yes and No are combined and Im not sure how to clear the previous. 

 

Each button has this for the OnSelect=UpdateContext({Var1:"Yes"}) or "No" or "N/A"

Text input field  Default=Var1&Var2

 

My overall goal is to clean up my screen so its not so busy with all the radio buttons. Radio buttons work great but don't look great. If you have any other suggestions that would be greatly appreciated!

Buttons.jpg
Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    It would be more work to create buttons but it is possible

     

    #1 Put this code in the OnVisible property of your screen

    Set(q1Yes,false);
    Set(q1No,false);
    Set(q1NA,false);

     

    #2 Put this code in the OnSelect property of the Yes button

    Set(q1Yes,true);
    Set(q1No,false);
    Set(q1NA,false);

     

    #3 Put this code in the OnSelect property of the No button

    Set(q1Yes,false);
    Set(q1No,true);
    Set(q1NA,false);

     

    #4 Put this code in the OnSelect property of the NA button

    Set(q1Yes,false);
    Set(q1No,false);
    Set(q1NA,true);

     

    #5 Put this code in your Edit Form Update field OR or the record's Q1 field name if using PATCH

    If(
     q1Yes,"Yes",
     q1No,"No",
     q1NA,"NA"
    )

     

    Of course you are going to have to code the Color & Fill properties of each button to indicate when a button is Selected.  Good luck!

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you very much! And wow, that would be a ton of work because there are 50+ questions. Is there a way to "Hide" the text field next to a radio button and have that button still work properly? When I remove the text it doesn't populate my text input, because I assume it is also tied to the value?

    Buttons2.jpg
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    Dead simplest way is to update the Color property to transparent

     

    RGBA(0, 0, 0, 0)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You have been very helpful and I greatly appreciate it! That is a great idea, but because there is text, there are large gaps between the radio buttons themselves. Any idea how to squish them closer together? Thanks again!

     
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    Here's the complete list of properties I would use to do this.  There doesn't appear to be any setting for button spacing directly.

    Color: RGBA(0, 0, 0, 0)
    Size: 0
    RadioSize: 30 //Optional

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard