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 / Component Collection V...
Power Apps
Suggested Answer

Component Collection Variable Not Getting Table Info

(0) ShareShare
ReportReport
Posted on by 1,362
Hello,
I am learning components and this attempt to learn isn't working.

I am stuck trying to use a collection to hold table information I can use in a gallery.
In my App Start Screen property I am using the following FX: 
ClearCollect(colNavItems, Table({Text: "Balloons", Screen: 'Balloon Screen',icon: imgBalloon},{Text: "Golf", Screen: 'Golf Screen',icon: imgGolf},{Text: "Automobiles", Screen: 'Automobile Screen',icon:imgCars}));

My Mega Menu Container component uses "Items" custom property
 
When I attempt to use the collection variable in my custom items property, the variable complains.
Can anyone help me with this?

Categories:
  • Suggested answer
    Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    you're on the right track with using a collection to hold table information for your gallery. Let's troubleshoot and ensure everything is set up correctly.

    1. Collection Initialization: Your ClearCollect function looks correct. It initializes colNavItems with the specified items. Ensure this code is placed in the OnStart property of your app or in a button's OnSelect property for testing purposes.

    2. Gallery Items Property: Make sure your gallery's Items property is set to colNavItems. This binds the collection to the gallery.

    3. Component Custom Property: If your Mega Menu Container component has a custom property named Items, you need to pass colNavItems to this property. For example, if your component is named MegaMenu, you can set its Items property like this:

    MegaMenu.Items = colNavItems

    4. Binding Data to Gallery Controls: Inside your gallery, bind the controls (e.g., labels, images) to the fields in your collection. For example:

    • Set the Text property of a label to ThisItem.Text
    • Set the Image property of an image control to ThisItem.icon

    Here's a step-by-step example:

    1. App OnStart Property:

    ClearCollect(colNavItems, 

        Table(

            {Text: "Balloons", Screen: 'Balloon Screen', icon: imgBalloon},

            {Text: "Golf", Screen: 'Golf Screen', icon: imgGolf},

            {Text: "Automobiles", Screen: 'Automobile Screen', icon: imgCars}

        )

    );

    2.-Gallery Items Property:

    colNavItems

    Component Items Property:

    MegaMenu.Items = colNavItems

    1. Binding Data in Gallery:

      • Label Text property: ThisItem.Text
      • Image Image property: ThisItem.icon
     
     

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard