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 / Gallery in Component
Power Apps
Suggested Answer

Gallery in Component

(1) ShareShare
ReportReport
Posted on by 2
Hello
I have created a component in my canvas app for the navigation menu. I pass a table/collection to this component which is displayed in a gallery in the component.
When it is called for the first time, the component is initialized and the gallery is displayed correctly.
When I navigate to another screen and back, the gallery is suddenly no longer displayed.
Sometimes it appears again after navigating back and forth several times...?
I used Notify to display the number of records from the table and Gallery.AllItems and this shows the correct number of records.
I also gave the background of the gallery a color to see if there is a Z-order issue. But the gallery is always visible, just without any elements.
I am very grateful for any advice.
Regards, Igor
Categories:
I have the same question (0)
  • Suggested answer
    tsa-svd2srv Profile Picture
    204 on at
    This is likely a component lifecycle issue. Here are the key fixes:
    • Move your data loading logic to the OnVisible property of the component's parent screen, rather than the component itself.
    • In the component, set the Items property of your gallery to:
    If(!IsBlank(Input.YourTableParameter), Input.YourTableParameter, Table())
    • Add Reset(GalleryName) to your navigation formula when returning to the screen.
    If the issue persists, check if any OnSelect formulas in your navigation are interrupting the data flow.
     
    These changes should maintain gallery data consistency across screen navigation.
  • IT-30071438-0 Profile Picture
    2 on at
    Hello.
    Thank you for your answer
    Unfortunately that didn't help.
    I have already created the table for the menu items in Screen.OnVisible. I have saved this table in a variable ("Set(MenuItems, Table(...)") and this is assigned to the table parameter of the component.
    The "Notify" in the component then shows the correct number of records.
    => Resetting the gallery didn't help either.
    => I have deactivated all OnSelect formulas.
    => I have also created an action property which I call in Screen OnVisible. In this action I call Reset(Gallery).
    => Even if I define the table in the component (statically) ("Gallery.Items = Table(....)") the gallery is only displayed the first time it is called and then no longer.
    Unfortunately, all this have not solved the problem.
    Is there anything else I could try?
    Many thanks
     

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
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard