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

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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard