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 / 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
    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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard