cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wellsy2k2
Level: Powered On

Adding Multiple Records

Hi All,

 

I have been working and researching this problem for a while and cannot work it out, even if it is possible or not?

 

I would like to add multiple records to an Excel data source.  I have a list of pupils (Pupil) and subjects (Subject), each pupil needs a record (single excel row) per subject.  So when i set up the Pupil (Name, Address, Phone....etc) and click submit i want every subject setup in another table called Progress (shows the progress per subject for that pupil).....hope that makes sense!

 

Any help appreciated,

Many thanks

Steve

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Adding Multiple Records

Hi Steve,

 

You can use Collect to do that; here's the link to the documentation: https://docs.microsoft.com/en-us/powerapps/functions/function-clear-collect-clearcollect

 

I use it in one of my apps to add items to my database from a local collection:

 

Collect('[dbo].[OnskelistaRad]'; cItemList)

The first parameter is the table I want to add the records to, and the second is the local collection containing the records(values) I want to add. I think the field names and types must be the exactly same. If you don't provide some fields in the local collection, these values will be empty or have the default value in the database, in your case the Excel file.

 

Hope this works as well with Excel as a data source as it does with SQL. Good luck!

 

 

 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Adding Multiple Records

Hi Steve,

 

You can use Collect to do that; here's the link to the documentation: https://docs.microsoft.com/en-us/powerapps/functions/function-clear-collect-clearcollect

 

I use it in one of my apps to add items to my database from a local collection:

 

Collect('[dbo].[OnskelistaRad]'; cItemList)

The first parameter is the table I want to add the records to, and the second is the local collection containing the records(values) I want to add. I think the field names and types must be the exactly same. If you don't provide some fields in the local collection, these values will be empty or have the default value in the database, in your case the Excel file.

 

Hope this works as well with Excel as a data source as it does with SQL. Good luck!

 

 

 

View solution in original post

Community Support Team
Community Support Team

Re: Adding Multiple Records

Hi Steve,

 

Please check this blog:

How to bulk update records in PowerApps

 

Regards,

Michael

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 337 members 6,436 guests
Please welcome our newest community members: