cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cooper33
Resolver III
Resolver III

Patch function error: The specified column does not exist

I have an Edit Form for a SharePoint list and a button that saves the data. Here is the OnSelect:

Patch('SP List Name', Gallery1.Selected, Form1.Updates)

This was working fine until I updated the SP list to delete a few columns I didn't need anymore. I am now getting 3 errors on the button (last two are the same)

  1. The function 'Patch' has some invalid arguments
  2. The specified column 'DeletedColumnName' does not exsit
  3. The specified column 'DeletedColumnName' does not exsit

I did delete that column but it is not in use anywhere in the PowerApp. I have tried recreating the gallery, refreshing datasource, and recreating the edit form and button. Still getting the error. Is there anything else this could mean?

1 ACCEPTED SOLUTION

Accepted Solutions

@cooper33  I would at least remove (comment out) any of those to troubleshoot.  You can put them back when you are done.  Comment out and reduce down to where the problem may be.  

It SHOULD just know what your new SP list has, again, all you did to resolve was good, there's just got to be something else depending on it that is not getting reset or redone.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

10 REPLIES 10
RandyHayes
Super User
Super User

@cooper33refreshing usually does the trick, but perhaps have you tried deleting the datasource and adding it back?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you for the suggestion, just tried that too. No luck

@cooper33 

Are you collecting, connecting or otherwise relying on the data source someplace else?

You have done all of the steps (refresh/delete/add-back datasource (that usually does the trick), added and built new gallery, added new form to data source) - those are all the things you could possibly do.  There has got to be something else relying on it that has not been changed.

Look for all of that first.

Then perhaps try to put a button on your screen and OnSelect do a Collect(myCol, 'Sp List Name') and then View->Collections and see if the columns are there or not.  That might give some clues.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks that was really helpful. It is an issue with a collection. When I go to File and click my collection (name is RecordsCollection), I see the column throwing the error twice

However, not sure why it is there... in my App in the OnStart property I have this formula:

ClearCollect(RecordsCollection,'SP List');

I removed this and reopened the editor and saw no collection at all. Then I added it back, started the app, and the collection populated with this column again. I don't think it should be there in the first place if it's reconnecting to SP right? I added a button to try to remove the column from the collection manually and haven't had luck with that:

DropColumns(RecordsCollection, "DeletedSPField")

@cooper33  I would at least remove (comment out) any of those to troubleshoot.  You can put them back when you are done.  Comment out and reduce down to where the problem may be.  

It SHOULD just know what your new SP list has, again, all you did to resolve was good, there's just got to be something else depending on it that is not getting reset or redone.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks again very much for all the help!

 

I ended up temporarily deleting any formula that had a reference to the collection. Closed everything, reopened, recreated the collection using ClearCollect() and it recreated without the deleted columns

Anonymous
Not applicable

I found my way here bc I added a column to a sql table that I use in a Power App and all of a sudden, 'Resource Not Found' any time my app queried the table.

 

As @RandyHayes suggested, I deleted the connection to the table in PowerApps and reconnected it.

 

This solved my issue.  Thanks @RandyHayes.

Eva1
Frequent Visitor

Thanks, had same problem and Delete and Reconnect resolved it!

Thank you! It worked after struggling for a day and finding this reply, 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,915)