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

Notifications

Announcements

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)
  • 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"

  • 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...

  • 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

    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'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

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard