Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

OnCheck and OnUncheck for Single Checkbox Selected in Gallery

(0) ShareShare
ReportReport
Posted on by 165

Hi, 

 

I have a gallery with a checkbox. I'd followed Select single checkbox within a gallery guide so that only one checkbox could be selected. I have success with the guide for one single checkbox can be selected in the gallery. 

 

Problem is that all checkboxes cannot be selected due to DisplayMode for the CheckBox is as follows:

 

 

 

If( Self.Value || Label49.Text = "1", Disabled, Edit)

 

 

 

The result of that is:

NurSabrina24_0-1668065709251.png

 

As you can see, once I have selected one, all will be disabled. So, I cannot uncheck the checked one to choose another checkbox.

 

Please help me so I can uncheck the same checkbox I have selected. 

 

Please help.

 

Thank you.

 

  • Verified answer
    NurSabrina24 Profile Picture
    NurSabrina24 165 on at
    Re: OnCheck and OnUncheck for Single Checkbox Selected in Gallery

    Sorry, 

     

    I have found the solutions.

     

    Here for anyone who stuck in this. 

     

    NurSabrina24_0-1668066497403.png

    So, the solution I made is from the one in the original post (DisplayMode for Checkbox), I'd added a code a little: 

    If( Self.Value && Label49.Text = "1" || Label49.Text = "0", DisplayMode.Edit, Disabled)

    **Label49 is the green highlighted one where I count checkbox value in a gallery.

     

    Hope it helps you. 

     

    Thank you. 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard