cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Include collection to include data in app design

Hi everyone

 

Is there a quick way to include a collection (including data) in the design by default, so that the first time the app is launched on a device it has this data without making any data source or API calls?

 

 

Thank you everyone

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @DavesTechTips,

 

You always need to use the Collect() function to create a collection within your app. 

 

Collect( DataSource, Item, ... )

  • DataSource – Required. The data source that you want to add data to. If it does not already exist, a new collection is created.
  • Item(s) - Required. One or more records or tables to add to the data source.

 

You could set the OnVisible property of the first screen of your app with above formula so that it will create a collection as long as the first screen load.

 

For your reference:

https://powerapps.microsoft.com/en-us/tutorials/create-update-collection/

https://powerapps.microsoft.com/en-us/tutorials/function-clear-collect-clearcollect/

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @DavesTechTips,

 

You always need to use the Collect() function to create a collection within your app. 

 

Collect( DataSource, Item, ... )

  • DataSource – Required. The data source that you want to add data to. If it does not already exist, a new collection is created.
  • Item(s) - Required. One or more records or tables to add to the data source.

 

You could set the OnVisible property of the first screen of your app with above formula so that it will create a collection as long as the first screen load.

 

For your reference:

https://powerapps.microsoft.com/en-us/tutorials/create-update-collection/

https://powerapps.microsoft.com/en-us/tutorials/function-clear-collect-clearcollect/

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you.

 

Now with the onstart function on the first screen of the app, this makes it even more viable.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (22,103)