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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delegation problem sor...
Power Apps
Unanswered

Delegation problem sorting a gallery with Countrows function

(0) ShareShare
ReportReport
Posted on by 18

Hello experts,

 

I'm trying to Sort a gallery depending on the number of users that have the records in the 'Usuarios MeGusta' field. The records are from a Sharepoit list.

This is the code:

 

 

Sort(
 'DS SPO CoEFullStack Shared Ideas';
 CountRows(ThisRecord.'Usuarios MeGusta');
 SortOrder.Descending
)

 

The sort view works perfectly, but I get a delegation problem on the line of CountRows(ThisRecord.'Usuarios MeGusta');

Could you help me? Many thanks in advance.

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

    @marinadengra9 

    CountRows() is not a delegatable function, however if you can filter your list to less than 2k records, it won't matter.  I suggest:

     

     

    With({_items: Filter('DS SPO CoEFullStack Shared Ideas'; !IsBlank('Usarios MeGusta'))};
     CountRows(_items);
     SortOrder.Descending
    )

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard