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.
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

8 REPLIES 8
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.
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.
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.
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

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!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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