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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Super User
Super User

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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,614)