cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wellsy2k2
Frequent Visitor

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
BitLord69
Memorable Member
Memorable Member

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
BitLord69
Memorable Member
Memorable Member

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!

 

 

 

v-micsh-msft
Community Support
Community Support

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,227)