Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

ClearCollect is Blank

Like (0) ShareShare
ReportReport
Posted on 23 Feb 2023 01:29:53 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:
  • Robert_ Profile Picture
    36 on 25 Feb 2023 at 16:53:36
    Re: ClearCollect is Blank

    Thanks so much @Drrickryp ! Worked like a charm.

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on 23 Feb 2023 at 03:39:11
    Re: ClearCollect is Blank

    @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 23 Feb 2023 at 01:59:50
    Re: ClearCollect is Blank

    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?

  • Robert_ Profile Picture
    36 on 23 Feb 2023 at 01:59:46
    Re: ClearCollect is Blank

    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?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 23 Feb 2023 at 01:41:41
    Re: ClearCollect is Blank

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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 250 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 128

#3
stampcoin Profile Picture

stampcoin 115

Overall leaderboard
Loading started