cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ntwizz
Level: Power Up

How to Patch Multiple Rows in an Excel Datasource

Hello,

 

I'm pretty new to PowerApps, but I'm building an app for work and having trouble with something.  My app is using an Excel datasource.  It's a pretty simple and easy setup.  I have a table in the datasource, let's say Table1, and 3 columns, Complete, Task, and Owner.  In the PowerApps form, the user's have the ability to select Yes or No for Complete, Task is view only, and they can enter their name in the Owner field.  Once they fill this all out, they can print it.  Now I want them to be able to clear the Complete and Owner fields out after they're done, so it's all blank again, except for the Task field.  Here's what I have, but this only clears out the first row.  I need all of the rows cleared out in one shot.  My "Clear Form" button has this in the OnSelect function.

 

Patch(Table1,First(Search(Table1,"","Owner","Complete")),{Owner:"",Complete:" "})

 

What the above does is, blanks out the Owner and Complete fields in the first row.  But I need it to do it for all the rows.  Can't figure out how to do it.  I'm sure it's pretty simple.  I tried to remove the "First" statement, but that didn't fly.  Any help would be greatly appreciated!  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ntwizz
Level: Power Up

Re: How to Patch Multiple Rows in an Excel Datasource

I think I figured it out. I used UpdateIf instead of Patch and that appears to work.  Just a takes a little longer to run than I would like, but it works.

 

UpdateIf(Table,true,{Complete:" ",Owner:""})

 

I knew it was easy!  Lol!

 

Thanks all!

View solution in original post

1 REPLY 1
ntwizz
Level: Power Up

Re: How to Patch Multiple Rows in an Excel Datasource

I think I figured it out. I used UpdateIf instead of Patch and that appears to work.  Just a takes a little longer to run than I would like, but it works.

 

UpdateIf(Table,true,{Complete:" ",Owner:""})

 

I knew it was easy!  Lol!

 

Thanks all!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,444)