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

Patch multiple records in one row

Hello,

I'm trying to build an app in which employees at our company can fill in job sheets and submit them to an excel spreadsheet. So far I've got the patch command to work with my date picker and one of my drop-down lists with separate "submit" buttons but ideally I want them to be able to fill out their jobsheet, hit the "submit" button and have that submit all of the input data to one row (i.e name, date, team leader, client etc) is there a command that can do this or do I have to chain multiple patch commands together? In the case of the latter how would I join these two patch codes together as an example?

Patch(Table3,Defaults(Table3),{'Team Leader': Dropdown2.SelectedText.Value})
Patch('Table3',Defaults('Table3'),{Date:DatePicker1.SelectedDate})

Many thanks
TW

1 ACCEPTED SOLUTION

Accepted Solutions
AmDev
Super User
Super User

Hi @twarb 

 

I though you meant multiple items (i.e. rows) to your datasource.

 

To patch multiple fields, just extend the record in your patch statement to include all the fields in your record like as follows:

 

Patch(Table3,Defaults(Table3),{'Team Leader': Dropdown2.SelectedText.Value, Date:DatePicker1.SelectedDate, otherfield: "etc", otherfield:"etc"})

 

Hope this helps

 

View solution in original post

2 REPLIES 2
AmDev
Super User
Super User

Hi @twarb 

 

I though you meant multiple items (i.e. rows) to your datasource.

 

To patch multiple fields, just extend the record in your patch statement to include all the fields in your record like as follows:

 

Patch(Table3,Defaults(Table3),{'Team Leader': Dropdown2.SelectedText.Value, Date:DatePicker1.SelectedDate, otherfield: "etc", otherfield:"etc"})

 

Hope this helps

 

twarb
Frequent Visitor

Hi again @AmDev 

Many thanks, I'm still a bit new to this so unsure of my way around some of the functions. Once again your wealth of knowledge has saved me; thank you!

TW

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,352)