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

Community site session details

Session Id : KVaQIT/PO8zD0MmeaS4Bka
Power Apps - Building Power Apps
Answered

How to Disable some of the Radio Button when another Radio Button is Clicked

Like (1) ShareShare
ReportReport
Posted on 5 Jan 2023 09:36:02 by 158

How can I disable some of the radio buttoncChoices in 2nd Radio whenever I choose something in 1st radio button.

 

Basically, I want to change the second radio button (Disable some of it, if possible) whenever I select something on the first radio button.

 

Intoxicated_1-1672910607181.png

 

For example, I select Head Office. the Second Radio Button (clickable choices) should only be:

        Office Equipments and Computer Equipments.

 

 

Note: I dont know if its important, but the two Radio Button are from different Sharepoint List.

 

Radio1: 

 

 

Item = Choices([@AdminCustody].JobSiteCategory)

 

 

Radio2: 

 

 

Item = Choices([@'Item MasterFile'].Category)

 

 

 

 

 

Categories:
I have the same question (0)
  • KeithAtherton Profile Picture
    3,690 Most Valuable Professional on 06 Jan 2023 at 12:42:41
    Re: How to Disable some of the Radio Button when another Radio Button is Clicked

    I cannot see the error details but guessing that the ClearCollect() method is throwing the error as the code is attempting to ClearCollect() directly against the choice.

     

    Try using the code I posted originally, which creates a new collection called colRadioButtonOptions.


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

  • Intoxicated Profile Picture
    158 on 06 Jan 2023 at 01:52:56
    Re: How to Disable some of the Radio Button when another Radio Button is Clicked

    Unfortunately, It still spits out error. I've already adjusted the changes that is needed. 

    Intoxicated_0-1672968089072.png

     

     

    Im stucked.

     

  • KeithAtherton Profile Picture
    3,690 Most Valuable Professional on 05 Jan 2023 at 10:25:18
    Re: How to Disable some of the Radio Button when another Radio Button is Clicked

    Yes, the new dynamically-built collection (colRadioButtonOptions) would replace the existing Choices(...) for the Items property.

     

    My example code will need changing to make it work for your solution.


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

  • Intoxicated Profile Picture
    158 on 05 Jan 2023 at 10:11:49
    Re: How to Disable some of the Radio Button when another Radio Button is Clicked

    I dont know if Its possible to change the RadioButton (Item) function since theres already 

    Choices([@AdminCustody].JobSiteCategory)

    in Item Function.

    Intoxicated_1-1672913281115.png

     

    It also gives Error.

     

    Also, All of the Items inside the Radio Button is already predefined via Sharepoint List *Type(Choice).

    Intoxicated_2-1672913315801.png

     

    Intoxicated_4-1672913480084.png

     

     

  • Verified answer
    KeithAtherton Profile Picture
    3,690 Most Valuable Professional on 05 Jan 2023 at 09:48:01
    Re: How to Disable some of the Radio Button when another Radio Button is Clicked

    Hi @Intoxicated,

     

    I'm not sure how to set radio button options enabled/disabled but, alternatively, the second radio button options could be changed depending on the first radio button option selected. For example:

    If (radOptions1.SelectedText.Name = "Head Office",
     ClearCollect(colRadioButtonOptions,
     {
     Name:"Office Equipments"
     },
     {
     Name:"Computer Equipments"
     }
     )
    );

     

    Then set the second radio buttons Items property to colRadioButtonOptions.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 936 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 375 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 330 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete