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

Patch function deletes data in editable/repeating table (buttons and icons)

Hi all. 

 

I'm following Reza Dorrani's tutorial for creating editable/repeating tables here: Power Apps Editable Table/Gallery like Excel (Tutorial) - YouTube. For some reason, whenever I use the patch function with the add row button or delete row button, it will wipe the text already inputted into the table. 

 

Here is my 'add row' button formula. 

 

Patch('Customer Service Task PT. 2',Defaults('Customer Service Task PT. 2'),{Title:"",'Product Code':"",QTY:"",Price:""})

 

 

Here is my 'delete row' bin icon formula

 

Remove('Customer Service Task PT. 2',ThisItem)

 

 

Reza clearly shows that he is able to modify text, add and delete rows live while retaining the remaining text. I believe that it may be due to my data source (SP list) but honestly, I have no idea. Any ideas on what I'm doing wrong?

Please have a look at Image 1 and 2 to see what happens when I click the 'add row' button.

7 REPLIES 7
Chellybean72
Frequent Visitor

Hi! I can tell you the trash can is for specifically deleting the row.  For the patch do you have a form you are filling in? 

 

Well I used the Patch function because I was following the YT guide. I have it patching to the data source which is a Sharepoint list. 

Try this code:

The XXXX is your share point list name. I don't use the ' XXX ' just use the name.

Patch(
XXXXXX ,
Defaults(XXXX),
{
Title:"",
ProductCode: "",
Qty:"",
Price:""
}
)

And just to be clear.   The code that is on the trash can is just for deleting rows. It will delete it from the gallery and the share point list. 😊  I am new to power apps. lol just trying to help!! 

Unfortunately, I'm still encountering the same issue. Thanks for trying!

What is the error you are getting?  I threw it together and got it to work. Double check your share point list name. 

I'm still getting the issue where when I add a row or delete a row, all the current data inputted into a text input field is wiped. Did you create a repeating table from the Reza video to test it out? That's awesome.

 

I've attached what my Sharepoint list and repeating table look like. As you can see, it can recognise the number of rows that are currently in the PowerApps repeating table. If you've tested it and it's working, I'm lost on what the underlying problem could be.

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 (4,662)