cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheIntern
Helper I
Helper I

Retrieve fetchxml results on demand

I'm using fetchxml and liquid code to display a list of records in a table. (Unable to use an entity list as there are multiple N:N relationships present, that make it hard to filter records). Currently, the fetchxml query returns over 5k records which can cause performance issues. Is there a way to fetch only a selected number of records at once and then retrieving more on pagination click event? 

3 REPLIES 3
OliverRodrigues
Super User II
Super User II

Hi, we can use top in FetchXML that allows you to retrieve less than 5k records, this is done at the top of the fetch:

<fetch top="10">

 

The FetchXML also contains a limitation from the RetrieveMultiple message, which will only retrieve 5,000 records. I don't think we can bring more results than that in Portals (haven't done it myself)

I would recommend trying to filter this list to less than 5k records, a tip for paging here would actually keep using entity list so in Liquid you can leverage from the paging feature, and any complex relationship you can query via Liquid while looping your entity list results - not sure about performance though

https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-entity-list-current-page


------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Hi @TheIntern 

Below blog might be help you to retrieve few records:

https://colinvermander.com/2018/06/26/dynamics-365-portal-use-liquid-fetchxml-with-paging-cookie/

--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

top="10" doesn't work for me.

You can use count="50" to limit your result set
(Thanks to Nicholas)

 

 

Greetings,
AndKan.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (57,053)