Skip to main content

Notifications

Power Pages - Design & Build
Suggested answer

Power Pages list filtering based on URL Parameter

(1) ShareShare
ReportReport
Posted on by 14

Hello,
 
I have a Power Page with a Home page and a Permit Page. The Home page contains a list of Accounts associated to the user, with a details link to the Permit Page that contains a List of Permits associated to the user. 
 
I need the list of Permits to be filtered by the accountid url parameter (the account that was clicked on from the Home page). I'm looking for a way to do this with OOB Power Pages functionality. 
 
Javascript does not work well, since it filters out the permits that should be hidden, but that leaves pages with different numbers of permits. I'm not aware of a way to paginate, without using a huge amount of custom code.
 
Typically I would use fetchXML or the WebAPI to get the records I need then build the HTML list with JS, and that is still an option, but wanted to exhaust all native capabilities first.
 
Thanks for any help you can provide!

Categories:
  • Kenneth Leong Profile Picture
    Kenneth Leong 6 on at
    Power Pages list filtering based on URL Parameter
    Got a question on the metafilter. When we're using the fetchxml metadata filter to put conditions on related entities, the conditions we put in the fetchxml are displayed as checkbox in the filter panel. can we put conditions on multiple attributes?
  • Suggested answer
    Inogic Profile Picture
    Inogic 901 on at
    Power Pages list filtering based on URL Parameter
    Hi,
     
    Please follow the below:-
     
    Step 1: Enable Filtering on the Permit List
     
    • Navigate to the Permit Page in your Power Pages site.
    • Find the Permit List that you want to filter.
    • Go to the list's Advanced Settings.
    • In the Filter section, check the option that allows the list to be filtered by query string parameters.
    • Specify the query string parameter that you want to filter by. In your case, it would be something like accountid.

    Step 2: Pass the accountid from the Home Page
     
    • On the Home Page, where you list the accounts, update the Details Link for each account to include the accountid in the query string.
    • The link should look something like this:
    • /PermitPage?accountid=<accountid_value>
    • When a user clicks on the details link, they are taken to the Permit Page, and the list is automatically filtered based on the accountid parameter passed in the URL.

    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/ 
  • Suggested answer
    Fubar Profile Picture
    Fubar 7,683 on at
    Power Pages list filtering based on URL Parameter
    If your Permits have a Lookup to Account (would also work for an N:N), then create an Account form that has a Subgrid for its Permits, and add that form to a new Web Page, then open that Web Page from either a List or from a Url passing the id of the account to the Web Page.
     
    In theory using Liquid you may be able to do something with a Lists View, but you need to have enabled and configured correctly Metadata filtering on the List (via Portal/Power Pages Management App) and then pass the correct filter into the View (but there is very little documentation on this) see the 'metafilter' under the entityview  Parameters

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics