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 / If( CountRows( Filter(...
Power Apps
Unanswered

If( CountRows( Filter( Won't work with lots of records. How to re-write it to avoid failure?

(0) ShareShare
ReportReport
Posted on by

Hi,

Quite new to this; came from... COBOL. Sorry for that. Thanks in advance.

 

If there are not many records, this works fine. Once we get a relevant set of data, it won't work.

 

If(

    CountRows(

        Filter(

            Vehicles;

            LicensePlate = DataCardValue17.Text

        )

    );

    SubmitForm(EditForm1);;

    ResetForm(Form2);

 

How can we rewrite it to work with any amount of records?

Best.

 

 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    Can you be more specific about what you mean when you say, "it won't work"?

     

    Are you getting a query delegation warning in the app designer UI?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @selhd00,

    Actually, the CountRows() function is non-delegable.

    If you want to use the CountRows() function to work with any amount of records, I am afraid there is no way to achieve this in Power Apps currently.

     

    As an alternative solution, I think you could combine with a flow to count records:

    vqiaqimsft_0-1646881491264.png

    length(body('Get_items')?['value'])

     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard