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:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,834 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard