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 / Show only checked item...
Power Apps
Unanswered

Show only checked items from gallery, in a Preview screen gallery

(0) ShareShare
ReportReport
Posted on by 603

I have a powerapps gallery with checkbox on each row. Once user clicks the preview button, it should take me to the next screen with the same gallery, but it should show only the selected items.

 

All the unselected one should be hidden in Preview screen. Any idea how to achieve this? Screenshot included below. 

 

Iantaylor2050_0-1684858436542.png

 

Categories:
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Iantaylor2050 ,
    OnCheck property of checkbox you can use -

     

    Collect(colPreviewData, ThisItem) 

     

    You can use below formula in UnCheck property of checkbox - 

     

    Remove(colPreviewData, ThisItem)

     

    You can use this collection in Items property of your preview gallery - 

     

    colPreviewData

     

     

  • Iantaylor2050 Profile Picture
    603 on at

    Hi @NandiniBhagya20 

     

    Thanks. The above code works. However if i comeback from the preview screen to the previous screen, the items which i checked already appears as unchecked. Can let me know how to preserve the checked items in first screen?

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Iantaylor2050 ,
    We will have to make some changes the code - 
    In App OnStart property you can put all data of your list in a collection - 

    ClearCollect(colListData,AddColumns(SPListName,"checkBoxVal",false))

    OnCheck property of checkbox - 

    UpdateIf(colListData, ID=ThisItem.ID, {checkBoxVal:true})

    OnUnCheck property of checkbox - 

    UpdateIf(colListData, ID=ThisItem.ID, {checkBoxVal:false})

    Items property of Gallery where checkbox is added - 

    colListData

    Items property of gallery where you would like to show checked in items - 

    Filter(colListData, checkBoxVal = true)

    If you want to clear the checkboxes, use below formula in OnSelect property of a button - 

    UpdateIf(colCheckBoxTestN, true, {checkBoxVal:false})

     



     

  • Iantaylor2050 Profile Picture
    603 on at

    Hi @NandiniBhagya20 

     

    I tried the above code. Still when I come back from preview screen to the previous screen, suddenly the checked items checkmark disappears intermittently. It should preserve all the checked items in the previous screen

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Iantaylor2050 , 
    It should work.
    Can you check checkBoxVal column values in the collection colListData.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard