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 / Creating collection in...
Power Apps
Unanswered

Creating collection in a component

(0) ShareShare
ReportReport
Posted on by 125

Hi All

I am working on a component that has a gallery from user can select some elements and I want to create collection for this gallery inside the component () . I know I can create collection in the app and pass it to the component via parameter, but I want the component to be self-contained, so when another developer adds it to their app they dont have to create collection and pass it to the component.

    So is thee something like onStart for component or any other way to do it?

Thanks

 

I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @romankorchak2 ,

     

    At my knowledge, you could not create a collection inside a component, you should create a collection outside and pass it inside the component.

     

    Best Regards,

    Wearsky

  • dave-jorgensen Profile Picture
    502 on at

    I'd suggest creating a table as an input parameter. Then, inside the component when you are creating it, set the value of the input parameter as a table with how you want your collection to look with field names and rows of data. that becomes the default value for the table input parameter, which is what it sounds like you want. It also gives you the ability from the PowerApp to change the default table to something else so you can add rows if needed, so you can reuse the component without having to push out a new version just because you want to add another option.

  • cchannon Profile Picture
    4,702 Moderator on at

    @romankorchak2 Did these posts resolve your issue? If so, please mark the solution so future visitors will see this issue as resolved.

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,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard