web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The specified column d...
Power Apps
Answered

The specified column does not exist

(1) ShareShare
ReportReport
Posted on by 157
Hi,
 
I am receiving the error:
 
  "The specified column 'ApproveComments' does not exist.  The column with the most similar name is 'ClosureComments'."
 
The data source is a SharePoint list and it used to have a column named 'ApproveComments', but this has now been deleted as it is not needed.  It is not reference anywhere in the app.
 
I do set a variable to be the current record:
 
Set(_recMOC,LookUp('SharePoint list',number=galRegister.Selected.number));
This variable '_recMOC' does have the 'ApproveComments' in it even though it is not in the SharePoint list.
 
The error appears in a Patch Command:
If(_statusToSave<>"Approved",
    Patch('SharePoint list',_recMOC,
        {
            status:_statusToSave
        }
    )
);
For some reason the '_recMOC' variable does not seem to be the same as the SharePoint list.
 
Pete
Categories:
I have the same question (0)
  • petewalburn Profile Picture
    157 on at
    I'm sure I could get around the error by adding the 'ApproveComments' column to the SharePoint list, but it is not referenced anywhere in the app. And I would rather not have unused columns in the SharePoint list if I don't need them.
     
    Pete
  • Verified answer
    MS.Ragavendar Profile Picture
    5,009 Super User 2025 Season 2 on at
    Hi,
     
    This issue happens because the _recMOC variable was created before the ApproveComments column was deleted. Since Power Apps caches data, the variable still holds a reference to the old schema, causing the error during the Patch operation.
     
    Before setting _recMOC, refresh the data source to ensure Power Apps is using the latest schema
     
    Refresh('SharePoint list');
    Set(_recMOC, Blank()); // Clear old data
    Set(_recMOC, LookUp('SharePoint list', number = galRegister.Selected.number));
    If(_statusToSave <> "Approved",
        Patch('SharePoint list', _recMOC, {status: _statusToSave})
    );
     
    After applying these fixes, save, publish, and reload the app to fully remove cached schema references

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item
     
  • petewalburn Profile Picture
    157 on at
    Thanks MSR@08012015,
     
    I was refreshing the SharePoint list, and setting the _recMOC variable to Blank() and then setting it using LookUp and was still getting the error.  However, it has now resolved itself.
     
    So, I guess it was still cached and causing a problem.
     
    Pete

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard