Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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.

 

 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: If( CountRows( Filter( Won't work with lots of records. How to re-write it to avoid failure?

    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'])

     

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: If( CountRows( Filter( Won't work with lots of records. How to re-write it to avoid failure?

    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?

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

🌸 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…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 75 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 51 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard