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

Edit Sharepoint list item whose ID is greater than 2000 limit

I have created an Power Apps where I collect data from my team on daily basis, also I have added an option through which a user can copy previous day's data and submit it after minor changes. Application is working fine but now when Sharepoint list has exceeded 2000 rows now users are not able to edit or view previous day's data. Please note I use Filter function which filters out data on the basis of date (I added a column in Sharepoint which converts date into integer value and filter is applied on this converted column) and user who is using the app.  I found a work around on the internet and created a Flow which sends data to Power Apps via REST API and the application stores the data in collection but I don't know how to view this data in my form and enable user to edit it. I need to perform following functionalities.

 

  • View data in Power Apps form.
  • Edit/Delete data.
  • Copy previous day's data and submit it as new list item.
1 ACCEPTED SOLUTION

Accepted Solutions
TurboTape
Resolver I
Resolver I

Hi Worker

 

You need to use local collections in powerapps (ClearCollect)

 

We have exceed more than 20 000 items in lists. To solve this you need to have a way to filter the data you need. Date should work, but you can also include other forms of ID (numbers is best):

Example. We have all our projects in Sharepoint list Who has a lot of tasks. For every elements I have made a masterStatusID with a number from 0 to 9. 0 is defined as deleted item and 9 is archived. I can the ask to get all project task that has masterStatusID > 0 and < 9. Even if we have like 5000 project and 20 000 task, I will only get the task that is active, and these is with good margin below 2000 items. (Of course if you have a big company you will get more, but usually you then split the project into divisions or department, and you solve this). 

 

So in your case, make a local collection. This can be put in OnStart or on visible or a button or whatever. I try to collect the most important stuff in OnStart and others when I need it. 

 

 

ClearCollect(
    _YesterdayData;
    Filter(
    Data('dateField'=Today()-1) ##(This worked for me, but lately I have to use DateAdd(Today();-1)
)
)
    

 

If you need todays data, you do the same (_TodayData). 

You can patch in 2 ways. Either you use UpdateIf(_YesterdayData) when you change something in your data. When you done editing, you can patch everything back to Sharepoint with Patch(Data;_YesterdayData) or you can patch each item with (

Patch(
Data;
{ID:ItemID};
{
datafield1:<data>;
datafield:<data>
}
)

## Also, rembember to update the local collection so the user sees the changes 

UpdateIf(    #I found Patcthing of local collections to be unstable, and always use UpdateIf here
_YesterdayData;   #Or TodaysData
ID=ItemID;
{
datafield1:<data>;
datafield:<data>
}
)


Feel free to ask for more details. As told, we have lots of data and so far, I dont have to use Automate to get this to work. 

 

If you have lots and lots of Data you need to be abele to search in, you have to use SQL. We use this on parts ( about 300 000 parts). Works like a charm, but its a Premium function. 

 

Best regards

Tommy

 

View solution in original post

1 REPLY 1
TurboTape
Resolver I
Resolver I

Hi Worker

 

You need to use local collections in powerapps (ClearCollect)

 

We have exceed more than 20 000 items in lists. To solve this you need to have a way to filter the data you need. Date should work, but you can also include other forms of ID (numbers is best):

Example. We have all our projects in Sharepoint list Who has a lot of tasks. For every elements I have made a masterStatusID with a number from 0 to 9. 0 is defined as deleted item and 9 is archived. I can the ask to get all project task that has masterStatusID > 0 and < 9. Even if we have like 5000 project and 20 000 task, I will only get the task that is active, and these is with good margin below 2000 items. (Of course if you have a big company you will get more, but usually you then split the project into divisions or department, and you solve this). 

 

So in your case, make a local collection. This can be put in OnStart or on visible or a button or whatever. I try to collect the most important stuff in OnStart and others when I need it. 

 

 

ClearCollect(
    _YesterdayData;
    Filter(
    Data('dateField'=Today()-1) ##(This worked for me, but lately I have to use DateAdd(Today();-1)
)
)
    

 

If you need todays data, you do the same (_TodayData). 

You can patch in 2 ways. Either you use UpdateIf(_YesterdayData) when you change something in your data. When you done editing, you can patch everything back to Sharepoint with Patch(Data;_YesterdayData) or you can patch each item with (

Patch(
Data;
{ID:ItemID};
{
datafield1:<data>;
datafield:<data>
}
)

## Also, rembember to update the local collection so the user sees the changes 

UpdateIf(    #I found Patcthing of local collections to be unstable, and always use UpdateIf here
_YesterdayData;   #Or TodaysData
ID=ItemID;
{
datafield1:<data>;
datafield:<data>
}
)


Feel free to ask for more details. As told, we have lots of data and so far, I dont have to use Automate to get this to work. 

 

If you have lots and lots of Data you need to be abele to search in, you have to use SQL. We use this on parts ( about 300 000 parts). Works like a charm, but its a Premium function. 

 

Best regards

Tommy

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (96,344)