web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ClearCollect is Blank
Power Apps
Answered

ClearCollect is Blank

(0) ShareShare
ReportReport
Posted on by 36

Hi all,

 

I'm using the following code on OnStart (App) to collect SP data since my list is greater than 2K. However, although PowerApps recognizes the new name "ViewAllRequests", the data is empty. RowID is a number column, copied from ID and I've indexed in SP. Maybe I need to wait for the Index to complete? There's no delegation or any other warnings with this code.

 

Concurrent(
ClearCollect(ViewRequestsA,Filter(Requests,RowID < 2000)),
ClearCollect(ViewRequestsB,Filter(Requests,RowID >= 2000 And RowID < 3000))

);
ClearCollect(ViewAllRequests,ViewRequestsA,ViewRequestsB);

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Robert_

    Concurrent(
    ClearCollect(ViewRequestsA,Sort(Requests, ID, Ascending), 
    ClearCollect(ViewRequestsB,Sort(Requests,ID, Descending)); 

    Collect(ViewAllRequests,Filter (ViewRequestsA,!(ViewRequestsB in ViewRequestsA);

    Works for up to 4k records. 

  • Robert_ Profile Picture
    36 on at

    Thanks. I get an error on the last Collect:

    Invalid schema, Expected a one-column table

     

    I still do not understand why my first code did not work. What happens when I get to 5,000 rows? Why is the original clearcollect blank and is there a way I can backtrace the code to see what it's doing?

  • Robert_ Profile Picture
    36 on at

    Thanks. I get an error on the last ClearCollect:

    Invalid schema, Expected a one-column table

     

    I still do not understand why my first code did not work. What happens when I get to 5,000 rows? Why is the original clearcollect blank and is there a way I can backtrace the code to see what it's doing?

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Robert_

    Sorry, it should be

    Collect(ViewAllRequests, ViewRequestsA, Filter(ViewRequestsB, !(ID in ViewRequestsA.ID);

    Works for up to 4k records

    Using collections is not the answer to delegation in large datasets as the various workarounds will cause performance hits. Either use delegatable SharePoint functions and operators or move your data to Sql or Dataverse. 

  • Robert_ Profile Picture
    36 on at

    Thanks so much @Drrickryp ! Worked like a charm.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard