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

Sharepoint list delegation > 500 or > 2000 (ID filter)

Hi, 

 

I have read a lot about the options available when working with large datasets. 

 

I have about 8,000 rows in sharepoint list. Sharepoint list name = "4Actions".

 

Im trying to filter the results and store them locally via ClearCollect to collection called "SiteActLive"

 

My formula is as per below. It work perfectly for the first 500 or 2000 records depending on how i've set the limits but then wont pull anything after that so it must not be delegating to sharepoint to do the calcs. 

 

ProjectID.Id = ID field in Sharepoint list

ThisItem.ID = Field from gallery 

 

ClearCollect(SiteActLive,Filter('4Actions',ProjectID.Id=ThisItem.ID))

 

Please help me! 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Eelman
Community Champion
Community Champion

@erobguy 

So I found a way that works for me by using a gallery and the LookUp column Value, not the Id. Try this:

 

Insert a Vertical gallery in your app and set it's Items property to this:

 

Filter('4Actions',ProjectID.Value=ThisItem.Value))

 

Add a button and set it's OnSelect to:

 

ClearCollect(SiteActLive,Gallery1.AllItems)

 

 

In my test, I have a SP List with a LookUp column (single not multiple) which has 3 records that meet my criteria. In the App settings I set the Data row limit to 2. My gallery (set as per above) retrieved all 3 records (tick).

 

Note: in my Filter, where you will have ThisItem.Value, I used hard coded Text. You may find you need to convert your relevant ThisItem.Value to a variable, ie Set(vMyVar, ThisItem.Value), then use this variable in your Filter.

 

Let me know how you get on.

 

Edit: this is a workaround. In my experience, Galleries are pretty much the only way to beat SP delegation issues. You pull the data into a gallery and then work from there.

View solution in original post

Eelman
Community Champion
Community Champion

@erobguy 

No worries, glad you got it sorted. Just remember to mark this as SOLVED so that others can find it if they have a similar issue.

 

All the best

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @erobguy ,

Do you face a Delegation warning issue with your Filter function?

How many records does the Filter function would returned? More than 2000?

Have you solved your problem?

 

I agree with @Eelman 's thought almost. You could consider modify your Filter formula as below:

ClearCollect(
             SiteActLive,
             Filter(
                     '4Actions',
                     ProjectID.Value = ThisItem.'Referenced Column'
             )
)

If you type ProjectID.Id formula within your above Filter function, you would face Delegation warning issue.

 

If you faced Delegation issue with your Filter function, you could only process first 2000 records of your '4Actions' list at most locally within your canvas app. If the desired record at 2001 or 7999 (more than 2000), then these records would be ignored, and not be saved into your collection.

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
Eelman
Community Champion
Community Champion

@erobguy 

How many records are you trying to collect to the App? This code will only bring in one record. Are you saying it won't collect past ID 2000?

erobguy
Frequent Visitor

Typically only collecting 50 records

 

erobguy
Frequent Visitor

Yes, it won't collect past 2000

Eelman
Community Champion
Community Champion

What formula are you using to try and collect 50 records? Are you using ID <>?

erobguy
Frequent Visitor

ClearCollect(SiteActLive,Filter('4Actions',ProjectID.Id=ThisItem.ID))

 

Project.ID is a lookup column in the SharePoint list 4Actions. It's not the ID for 4Actions. 

Eelman
Community Champion
Community Champion

@erobguy 

So I found a way that works for me by using a gallery and the LookUp column Value, not the Id. Try this:

 

Insert a Vertical gallery in your app and set it's Items property to this:

 

Filter('4Actions',ProjectID.Value=ThisItem.Value))

 

Add a button and set it's OnSelect to:

 

ClearCollect(SiteActLive,Gallery1.AllItems)

 

 

In my test, I have a SP List with a LookUp column (single not multiple) which has 3 records that meet my criteria. In the App settings I set the Data row limit to 2. My gallery (set as per above) retrieved all 3 records (tick).

 

Note: in my Filter, where you will have ThisItem.Value, I used hard coded Text. You may find you need to convert your relevant ThisItem.Value to a variable, ie Set(vMyVar, ThisItem.Value), then use this variable in your Filter.

 

Let me know how you get on.

 

Edit: this is a workaround. In my experience, Galleries are pretty much the only way to beat SP delegation issues. You pull the data into a gallery and then work from there.

erobguy
Frequent Visitor

ThisItem.Value isn't being recognised as anything

Eelman
Community Champion
Community Champion

All LookUp columns have an Id and a Value. Can you share some more about your app? Screenshots, code, are you using a gallery, etc

erobguy
Frequent Visitor

ive just realised that the lookup in sharepoint is not looking up the ID it is looking up a different field so when you use . Value its pulling in a different value to ID. Ive changed it to ID in sharepoint and it now works! thanks !

Helpful resources

Announcements
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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,181)