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 Pages / Liquid not getting all...
Power Pages
Unanswered

Liquid not getting all the records from entity

(0) ShareShare
ReportReport
Posted on by 75

It is only returns 10 records even I have like 30+ records

ThareLyn_0-1623065252734.png

 

Mycode is:

ThareLyn_1-1623065351174.png

 

Does anyone knows the problem in here? Please help. Thanks.

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    In your entity list itself, can you check the page size? By default that is set to 10 records, so basically you need to add paging to your Liquid code, or simply increase that configuration

     

    If you need to add paging, the official documentation shows an example on how to do it: https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-entity-list-current-page

     

  • ThareLyn Profile Picture
    75 on at

    Well to be honest. I put a 3 on page size

    ThareLyn_0-1623066930205.png

    Because I only need to get the most recent 3 items that the current portal user owned.

    But still returns 10 records. I also tried to put 99 on that and still returns 10 records.

    ThareLyn_1-1623067136403.png

     

  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Have you cleared the cache after changing the configuration? If yes, then that sounds like a bug.

     

    What you can do here is use the forloop object and check the index:

    https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#forloop

    {% if forloop.index < 3 %}
    .....

    not sure there is a break instruction in Liquid, I think perhaps it's not available in the version for Power Apps Portals

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @ThareLyn  and @OliverRodrigues

    There is a limit parameter that allows to exit the loop: https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/iteration-tags#parameters . For example this will exist loop after third item:

    {% for child_page in page.children limit:3 %}
    
    <a href={{ child_page.url }}>{{ child_page.title }}</a>
    
    {% endfor %}

    Regarding the entitylist - there is a parameter on the entityview called pagesize which should take the date from Page Size field. I think this is not happening as you are rendering liquid and not passing this parameter. Please take a look on this official example from MS on how to render a list: https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-entity-list-current-page. Based on it you should try the next code:

    {% entityview id:params.view, page:params.page, pagesize:params.pagesize %}
    ...........

     

  • ThareLyn Profile Picture
    75 on at

    Hi,

    Yes I always clear my cache whenever I did a change in portal management or codes.

    And I tried to count the total record that it counts using entityview . total_records

    ThareLyn_0-1623068947623.png


    Yes I can use the 

    the loopindex

    But, but it will return the top 3 of the 10 record that is being returned. The issue is, I need to get all the record then filter it to records the is related to the current user of portal, then get the 3 most recent.

  • ThareLyn Profile Picture
    75 on at

    I need to get all the record first because if I filter the 10 records that is being return, it doesn't show the other records that should be related on my portal user test account

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    So you need to obtain only records related to the current user? If yes and your user should see only them any way I would advice you to configure table permissions so the system will return only records your user has access to. Also if you don't need to use an entity list you can fetch the data directly via fetchxml and filter them immediately by the user in the request itself.

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 Pages

#1
Fubar Profile Picture

Fubar 89 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard