Skip to main content

Notifications

Community site session details

Community site session details

Session Id : z+a9gkb14IMo9ZQEnlyu20
Power Apps - Microsoft Dataverse
Answered

FetchXML: how to get records by page and records count in the same query?

Like (0) ShareShare
ReportReport
Posted on 26 Feb 2024 12:31:44 by 264

Hi, guys!

There are about 50k records in my entity.

I use "PA: List Rows" with some conditions to get records.

 

 

<fetch count='@{triggerBody()['number']}' page='@{triggerBody()['number_1']}' >
 <entity name='pbl_items'>
 <attribute name='pbl_itemsid' />
......

 

 

So I get a portion of records, but i'd like to get record count that match my conditions.

Is it possible to get RecordCount in the same query (in one touch)?

Maybe FetchXML has the feature/trick?

  • Max77 Profile Picture
    264 on 26 Feb 2024 at 20:14:53
    Re: FetchXML: how to get records by page and recors count in the same query?

    @a33ik thank you very much!

    It works.

    The list Rows result contains odata.count

    Max77_0-1708978423647.png

     

  • Verified answer
    a33ik Profile Picture
    3,304 Most Valuable Professional on 26 Feb 2024 at 19:20:28
    Re: FetchXML: how to get records by page and recors count in the same query?

    Hello,

    You can try to use the following attribute in FetchXml query:

    <fetch returntotalrecordcount="true">

     It should return the total number of records. One thing I'm not sure is how to get it out of the results.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Loading started