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 / How to hide an item fr...
Power Apps
Answered

How to hide an item from a gallery?

(0) ShareShare
ReportReport
Posted on by 42

Hi all,

 

I have a Power Apps gallery and the data source for it is a collection called "colChat". The gallery's fields are "role" and "content". I want to hide (not show to the user) only the first item of colChat, without deleting the item from the collection. Is there anyway i can do this? I have tried with filter, patch and some other approaches and always faced a dead end.

 

Thank you very much in advance.

Categories:
I have the same question (0)
  • victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    try this:

    LastN(colChat,CountRows(colChat)-1)
  • Ts01 Profile Picture
    42 on at

    Hi @victorcp. Thanks for getting back.

    I used items = LastN(colChat,CountRows(colChat)-1) but unfortunately it still prints the first item in the gallery.

    EDIT: When previewing the app it works as it should. It hides the first item. But when i play the app it does not work. Am i doing smth wrong? (Total noob here...)

  • victorcp Profile Picture
    2,350 Moderator on at

    can you share a picture of the gallery?

     

    I recreated your case and it worked like a charm

    victorcp_0-1681119107845.png

     

  • Ts01 Profile Picture
    42 on at

    @victorcp Your answer works. In preview it works as it should. However, when i play the app it does not. I guess that the last version is not live. Please see the attached screenshot.

    screenshot1.png
  • Verified answer
    victorcp Profile Picture
    2,350 Moderator on at

    you have to publish to your changes take effect here:

    victorcp_0-1681120617485.png

    you can also edit the details before publish, but it is opcional

    victorcp_1-1681120645415.png

    Sometimes it take 1 or 2 min to be visible in play mode if it take longer than that try to clean the cache using ctrl + F5

     

  • Ts01 Profile Picture
    42 on at

    Thank you very much @victorcp  for your valuable contribution. You are a life saver. 🙂

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard