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

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

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

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

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

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

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!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,229)