cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmcquerry
Regular Visitor

Collection Not Populating Correctly

I'm using this to keep track of tickets and we have been using this powerapp with no issues until recently, when we hit about 3300 tickets a few days ago.

 

As far as we can tell, it seemed to have stopped at some point on 7/30, and is no longer retrieving tickets from our sharepoint list data source.

 

The code we have been using is below:

 

Concurrent(
    ClearCollect(CollectionA,Filter([@'IT Ticketing System'],ID<2000)),
    ClearCollect(CollectionB,Filter([@'IT Ticketing System'],ID >=2000 And ID<4000))
    );


ClearCollect(TotalCollection, CollectionA, CollectionB);
Sum(
     ForAll(
            Filter(TotalCollection, 'Task Status'.Value = "Not Started"),
            1
     ),
     Value
)
+ 0

 

Where the unique ID's of our tickets are being used as a filter since we have over 2000 tickets already, which to my understanding is the max per pull from the sharepoint list.

 

We have tried breaking up the collection into more smaller collections, filtering just one collection where the Not Started tickets should be in, but after some digging it seems to be an issue where we're filtering because TotalCollection does not contain any Not Started tickets or tickets after 7/30. 

 

None of the code was changed between this time and now until we noticed the tickets no longer showing. We have verified that the sharepoint list is still creating tickets from our flow, so we know the tickets exist in the system.

 

We do get the below warning, on the first code piece, although I'm not quite sure how to fix it. We believed the collection should've solved this issue since we were now breaking up our list into collections rather than just using the list as a whole:

 

Capture.PNG

 

Any advice would be appreciated as this is not only my first post here, but also only been learning PowerApps recently.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@dmcquerry 

The ID column is not delegable in SharePoint except when using the equal operator.  You are using the less-than greater-than operators which will not work as you expect.

 

My suggestion is that you prefilter and consider any particular reason to load ALL of these records into the memory of your app.  As a casual observation, it seems that a ticketing system would have tickets that are "closed" or "open".  Or, perhaps the "Started", "Not Started" status you mention could suffice as well. I would consider filtering on that first in a delegable way, rather than trying to load all of them into the app.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
Nogueira1306
Resident Rockstar
Resident Rockstar

Hey! Sharepoint can have uo to 5k itens but u can only search until 2k itens

What you could do is. Create a collection until 2k and create another until 4k and so on

RandyHayes
Super User III
Super User III

@dmcquerry 

The ID column is not delegable in SharePoint except when using the equal operator.  You are using the less-than greater-than operators which will not work as you expect.

 

My suggestion is that you prefilter and consider any particular reason to load ALL of these records into the memory of your app.  As a casual observation, it seems that a ticketing system would have tickets that are "closed" or "open".  Or, perhaps the "Started", "Not Started" status you mention could suffice as well. I would consider filtering on that first in a delegable way, rather than trying to load all of them into the app.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Appreciate the advice, I will try this out.

That is what I'm doing, but as @RandyHayes pointed out I can also try filtering beforehand. I will attempt this and see

You can also try something like this:

ClearCollect(
Col1;
Filter(
Intervenções;
ID < 2000
)
);;
ClearCollect(
Col2;
Filter(
Intervenções;
ID >= 2000 And ID < 4000
)
);;

 

 

If you don t every item, I agree with @RandyHayes 

RandyHayes
Super User III
Super User III

@Nogueira1306 

ID with any other operator other than equals ( = )  is NOT delegable.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

This worked! I appreciate the help

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (978)