cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hpc1
Helper I
Helper I

Another delegation issue

I try to get all records of a certain date range from a SP list. The total of the records in this date range is around 3'000. The dates are all converted to numbers (Date2Num) but nevertheless I get a delegation warning and I don't get all the records with the following filter function:

 

ClearCollect(colNotenuebersicht;
Filter(Notenuebersicht;

Date2Num >= LookUp(Jahresplan;Title="Beginn Semester 1";Date2Num) ;

Date2Num <= LookUp(Jahresplan;Title="Ende Semester 1";Date2Num)))

 

What did I do wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@hpc1 

If your list is between 2k and 4k you can create a collection and use it instead of your SPlist to use Search(), the in operator with a filter.  This formula will work for SP lists up to 4000, after that a different method will be needed.

Concurrent(
    ClearCollect(
         col1,
         Sort(SPlist, ID, Ascending)
     ),
     ClearCollect(
         col2,
         Sort(SPlist, ID, Descending)
     )
);
 ClearCollect(
     colAll,
     col1,
     Filter(col2, Not(ID in col1.ID))
 );
Clear(col1);
Clear(col2)

 

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@hpc1 

If your list is between 2k and 4k you can create a collection and use it instead of your SPlist to use Search(), the in operator with a filter.  This formula will work for SP lists up to 4000, after that a different method will be needed.

Concurrent(
    ClearCollect(
         col1,
         Sort(SPlist, ID, Ascending)
     ),
     ClearCollect(
         col2,
         Sort(SPlist, ID, Descending)
     )
);
 ClearCollect(
     colAll,
     col1,
     Filter(col2, Not(ID in col1.ID))
 );
Clear(col1);
Clear(col2)

 

hpc1
Helper I
Helper I

Thank you very much. It worked!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,918)