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 / Checkbox doesn't work ...
Power Apps
Answered

Checkbox doesn't work as expected

(0) ShareShare
ReportReport
Posted on by 33

Hi, I have a gallery based on a collection. In this gallery I have 2 checkboxes. The Check Proprety is : 

Patch(col2000_vj; LookUp(col2000_vj; ID = gal_2000_vj.Selected.ID); {chkb_ja: true});;

The Uncheck is: 

Patch(col2000_vj; LookUp(col2000_vj; ID = gal_2000_vj.Selected.ID); {chkb_ja: false});;

When I click one on the checkbox, the chkb_ja is set to true thats ok, but my checkbox doesn't light up, I have to click again on that checkbox to show up the "checked" symbol. So to uncheck I have to click twice on that box. But I can't find any error. 

Somebody has an idea? 

Many thanks 🙂

pic 1.png

 

Categories:
I have the same question (0)
  • Verified answer
    Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @wuffwuff2004 

     

    Make sure the checkbox 'default' property has the following:

     

    ThisItem.chkb_ja

     

    Hope this helps

     

  • QuentinDURIEZ Profile Picture
    577 Moderator on at

    Hi,

    Since your patching your datasource when clicking on the checkbox, the gallery will refresh.

    You need to define the Checked property of your checkbox :

     

    Checked = ThisItem.chkb_ja

     

    Regards,

  • wuffwuff2004 Profile Picture
    33 on at

    Hi, many thanks yes indeed it was the fault DEFAULT value  😕 

    My Thanks

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    @wuffwuff2004  That's great glad you're sorted and please mark it as a solution if this solved your issue 👍

     

    Just another quick one on your code - if 'col2000_vj' is feeding the items in 'gal_2000_vj', there is no need to use a lookup in your code. Given that the Checkbox is inside the same gallery, you can use 'ThisItem' context to reference the record:

     

    Patch(col2000_vj; ThisItem; {chkb_ja: true});;

      

    The same will apply to the OnUncheck

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard