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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Record in Gal...
Power Apps
Answered

Patching Record in Gallery: ThisItem returning an error "Column does not exist" ...but column is existing in datasource!

(0) ShareShare
ReportReport
Posted on by 4

Hi Guys,

I have the following patch formula saved on a Save Icon within a Gallery:  Patch('CN FX Imports Tracker', ThisItem, {Remarks: TextInput1.Text}). It used to work wonders until I updated my collection to pull out more than 2000 line items. Initially, I was working with my SP list (CN FX Imports Tracker) as my gallery datasource. However, I noticed that I was not pulling records beyond 2000 rows. So I followed some guide and used Microsoft Flow PowerAutomate to pull all data records first and throw back the consolidated result to PowerApps. I then collected that data into a collection (let's put it as 'New FX Imports Tracker') and can confirm to see all records beyond 2000 rows now. However, when I updated the gallery to this new collection, my patch function is now returning an error message in the ThisItem line saying 'Some column is not existing'.

 

However, I'm pretty sure that the column it's saying is existing. I created 2 datatables using the SP list (CN FX Imports Tracker) and another one using the New FX Imports Tracker, pulled out the column, and I can definitely see the data for both, so it's not missing! Now, if I update my Patch function to put the 'New FX Imports Tracker' as the datasource, the error disappears! BUT, i want to patch the SP list directly instead, not my collection. Below are some pictures:

 

nicolagmay_0-1594049776563.png

 

My Data for your information

Sharepoint List - CN FX Imports Tracker

Collection (for more than 2000 rows) - New FX Imports Tracker

What I want to do: Patch a single record (column) directly to my SP list

Gallery Datasource before issue: CN FX Imports Tracker

Patch Function that was previously working - Patch('CN FX Imports Tracker', ThisItem, {Remarks: TextInput14_1.Text})

Gallery Datasource with issue: New FX Imports Tracker

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @nicolagmay ,

    Do you set your app like this?

    Gallery's Items: New FX Imports Tracker

    the button's OnSelect inside the gallery: Patch('CN FX Imports Tracker', ThisItem, {'AP/AFF's Remark': TextInput14_1.Text})

    If so, the reason why you get that error message is that:
    The patch's data source is 'CN FX Imports Tracker'.

    "ThisItem" in the gallery represent a record of New FX Imports Tracker.

    So "ThisItem" does not point to the same data source as the first parameter.

     

    Please make sure that: the patch function's first parameter and second parameter should point to the same data source.

     

    If you insist making the gallery's Items to  New FX Imports Tracker, then you need to filter get the related record of 'CN FX Imports Tracker' when patching.

    The patch function should be like this:

    Patch('CN FX Imports Tracker', LookUp('CN FX Imports Tracker',ID=ThisItem.ID), {'AP/AFF's Remark': TextInput14_1.Text})

     

     

     

    Best regards,

  • nicolagmay Profile Picture
    4 on at

    You are a life saver!

    Although this is weird, because before I created my new collection with over 2000 rows, I was already using another collection (TableValue) with the CN FX Imports Tracker as the data source. The TableValue was the Gallery's Item and the old patch function was working flawlessly! This is the reason I never thought that having a different data source in the patch would have been the issue.

     

    Anyways, I updated my patch function with yours and it has worked!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard