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

CountIf Sharepoint List delegation workaround

I have a Sharepoint list with a column "Status" that is either "In Process" or "Completed".

I want to return the number of "In Process" records. 

CountIf(MySPList, Status="In Process")

The issue I run into is my list has grown larger than the non-delegable limit.

I tried to sort my SP List by created date, thinking PowerApps will look at the newest records only and ignore the older ones (assuming my oldest records are all marked as "Complete" now and I dont care about counting those)

But that did not seem to do the trick. 

How do I get PowerApps to only Count the newest records in my SP List to workaround the delegation limit?

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

If the number of In Process records will stay below the data row limit, you could do this by pre-filtering the list based on Status using this formula

CountRows(Filter(MySPList, Status="In Process"))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

If the number of In Process records will stay below the data row limit, you could do this by pre-filtering the list based on Status using this formula

CountRows(Filter(MySPList, Status="In Process"))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

RandyHayes
Super User III
Super User III

@mminervini 

In addition to @Pstork1 's suggestion (which will still give you a delegation warning), you can also use a formula like this:

   Len(Concat(Filter(MySPList, Status="In Process"), "X"))

 

Also, to add to @Pstork1 's suggestion.  It is interesting that PowerApps provides a warning for that formula, yet this one does not:

With({ds:Filter(MySPList, Status="In Process"))},
   CountRows(ds)
)

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
mminervini
Frequent Visitor

Duh! Should have realized I could just pre-filter...

I actually have filtered galleries within the same app so my solution looks more like this:

CountRows(Gallery1.Allitems)

Thanks for the help!

Worked for me, thanks 😀 ! I used this formula: Len(Concat(Filter(MySPList, Status="In Process"), "X"))

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

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 the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (36,043)