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:
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
Solved! Go to Solution.
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,
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,
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!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
192 | |
95 | |
64 | |
62 | |
58 |
User | Count |
---|---|
244 | |
166 | |
91 | |
78 | |
76 |