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 Pages / Power Pages lists with...
Power Pages
Suggested Answer

Power Pages lists with filtered data

(0) ShareShare
ReportReport
Posted on by 6
I have a list in one of the pages in my power pages portal. 
This list is connected to a custom table called cra47_role and is showing all the data in that table. I want this list to be filtered by a lookup field and only show those data related to that record when the page loads. 
I do not want to use the metadata filter as I have to choose filter and besides my filtering criteria would change overtime and that lookup field would have more data in its own table and I do not want to go back to portal management and add options to the filter. 
I can clear the list and make my own list by addressing this in documentation
$(document).ready(function (){
   $(".entitylist.entity-grid").on("loaded", function () {
      $(this).children(".view-grid").find("td[data-attribute='accountnumber']").each(function (i, e){
         var value = $(this).data(value);
         // now that you have the value you can do something to the value
      });
   });
});
but then I want to have the drop down action configuration buttons and their functionality like editing and deleting a record.
is there a way to filter the data input of the list?
Categories:
I have the same question (0)
  • Inogic Profile Picture
    1,265 Moderator on at
    As per our understanding you want to avoid metadata filters in Portal Management (due to the limitations you mentioned), another approach would be to dynamically pass the filter criteria to the list query at the server level, ensuring that the list is loaded with the relevant data when the page is loaded.
     
    Approach: Filter Data Input of the List
    You can achieve this using server-side filtering with Liquid to dynamically pass filter criteria to the list query, ensuring that relevant data is loaded when the page is accessed. This method avoids the limitations of metadata filters, making it adaptable to changes in lookup data.
    Solution: Server-Side Filtering with Liquid
    Step 1: Retrieve Lookup Field Value Using Liquid
    You can use the Liquid templating engine to retrieve the lookup field value dynamically when the page loads. This lookup value can be passed via the URL query string or derived from other sources like the logged-in user's data.
    liquid

    {% assign lookupValue = request.params['lookupfield'] %}
    This retrieves the value from the query string (e.g., ?lookupfield=value). You can also adjust the code to pull the value from other contexts, such as the logged-in user's record, if necessary.
    Step 2: Filter the List Based on Lookup Value
    Using the entitylist tag, you can filter the list based on the retrieved lookup field value.
    liquid

    {% if lookupValue %}
        {% entitylist name: 'YourEntityListName' filter: "lookupfield eq '" | append: lookupValue | append: "'" %}
    {% else %}
        {% entitylist name: 'YourEntityListName' %}
    {% endif %}
    • Replace YourEntityListName with the actual name of your entity list.
    • Replace lookupfield with the schema name of the lookup field you want to filter by.
    This filters the data at the server level before it is rendered on the page, ensuring that only relevant records appear. Since it's handled server-side, all standard actions like edit, delete, and view remain functional.
    Step 3: Dynamic Lookup Value with Dropdown (Optional)
    If the lookup value should be selected dynamically by the user, you can pass the lookup field value through the URL by triggering a page reload when a dropdown value is selected. Please refer below code 



    When the user selects a value from the dropdown, the page reloads with the selected value as a query parameter (e.g., ?lookupfield=value1). The Liquid template will then filter the list based on this value.
    Benefits of Server-Side Filtering:
    • Preserve All Action Buttons: Since filtering is handled at the server level, the action buttons like edit and delete remain fully functional.
    • Dynamic Filtering: You can filter lists dynamically without needing to update metadata filters, making the solution flexible for future changes in the lookup field's data.
    • Performance: Unlike client-side filtering, which loads all data and then hides unwanted rows, server-side filtering only retrieves relevant records, ensuring optimal performance.
    Example Scenario:
    • You have a list of cra47_role records.
    • The list is filtered based on a lookup field (e.g., account or contact).
    • The page dynamically shows only relevant records based on the lookup field, while preserving the default list actions (edit, delete, etc.).
    This approach ensures the data is filtered correctly at the server level, maintaining all list functionalities and avoiding the limitations of client-side filtering or metadata filters.

    Thanks
    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ ​​​​​​​
  • ramsha013 Profile Picture
    36 on at
    @Inogic where do I have to place this code exactly? I have a similar requirement but cant get it to work.
  • Suggested answer
    Ajlan Profile Picture
    237 on at
    Hi,
    You can follow these steps:
     
    • Create a form in of your Lookup field entity and add only the "cra47_role" subgrid on that form.
    • Create a basic form in Power Pages, then select the form of your Lookup field (created above) and add metadata to display the subgrid. You can configure actions for the "cra47_role" entity as needed.
    • Create a page in Power Pages and add this form to the page.

    Next, create a List in Power Pages to display all the records of your Lookup field. Under the options, enable the Edit or Details action and set it to redirect to the form you created earlier. This will display all the records associated with the Lookup record selected from the list.

    Cheers! 🎉
  • PG- Assistant Technical Consultant Profile Picture
    13 on at
       Hi
     
    Step 1: Open List Settings
    • In Power Pages Studio, select the List component you added to your web page.
       
    Step 2: Enable the New Experience
    • At the top of the List Settings panel, toggle ON:
    • “Try the new and improved version of this component.”
    • This gives you access to enhanced UI features like built-in filtering, search, paging, etc.
       
    Step 3: Add Filters (Field Filtering)
    • Once you've enabled the preview experience and selected a data view:
    • Save the list
    • Go to the live Power Pages site
    • You’ll see: A search bar
    • A filter panel (if your selected view supports it)
    • You can optionally use column headers to filter/sort



       

       

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 51

#2
rezarizvii Profile Picture

rezarizvii 35

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 33 Most Valuable Professional

Last 30 days Overall leaderboard