Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Creating collection in a component

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?



Community Support
Community Support

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,


Advocate V
Advocate V

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.

Super User
Super User

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

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (3,085)