Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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

 

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Creating collection in a component

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

  • dave-jorgensen Profile Picture
    502 on at
    Re: Creating collection in a component

    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.

  • v-xiaochen-msft Profile Picture
    on at
    Re: Creating collection in a component

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard