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 / Click on button show c...
Power Apps
Answered

Click on button show check icon in Gallery

(1) ShareShare
ReportReport
Posted on by

Hi,

 

I'm trying to create a code, when click on a button it will show check icon in Gallery.

I hope you can help me in this matter.

 

kinghnvn_1-1637745261341.png

Thanks.

 

 

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @kinghnvn 

     

    I'm not sure what you are trying here but with the gallery, we have 2 possibilities

     

    1. Check the icon for the selected item/row

    • Set the OnSelect property of the button to

     

     

    UpdateContext({varCheckIcon:true})

     

     

      • Set Default Property of Checkbox to

     

     

    varCheckIcon && ThisItem.IsSelected

     

     

      • Result

    StalinPonnusamy_0-1637814587803.png

     

    2. Check all items in the gallery

    Set the Default property of Checkbox to

     

     

    varCheckIcon

     

     

    Result

    StalinPonnusamy_1-1637814621351.png

     

    If you want the second option then the button should be outside the gallery. 


    Thanks,
    Stalin - Learn To Illuminate

     

     

  • kinghnvn Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    I want to use a check icon, can I do same the steps?

     

    kinghnvn_0-1637815103811.png

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @kinghnvn 

     

    I believe I found the solution that you were originally looking for

     

    Set the OnSelect property of the Button to

    If(Not(ThisItem.ID in ColItemSelected),Collect(ColItemSelected, {ID:ThisItem.ID}))

    Set the Default property of Checkbox to

    ThisItem.ID in ColItemSelected.ID

     

    If you want to use Check Icon then Set the Visible property of Icon to

    ThisItem.ID in ColItemSelected.ID

     

    Result

    StalinPonnusamy_0-1637819093979.png

     

    Note:

    1. We can use either CHeckbox control or Icon

    2. Set Onvisible property of the screen to

    Clear(ColItemSelected)


    Thanks,
    Stalin - Learn To Illuminate

  • kinghnvn Profile Picture
    on at

    @StalinPonnusamy 

     

    if I press F5 to refresh app or close the app and open it again, the icon will be hidden. that is incorrect...

  • Verified answer
    kinghnvn Profile Picture
    on at

    @StalinPonnusamy 

     

    I think I found the solution 🙂

     

    If click on the button -> add new record: CheckInButton = Yes

    Set the Visible property of Icon to ThisItem.CheckInButton = "Yes"

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard