cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Filtering entity list by query string value for Portal Page

Hey looking for some help on Filter Entity List's. 

Currently am developing a Portal for the company I work for and we are generating links to pages based off data in the CDS. The basic idea is creating a portal for users to check information of Projects they have with us and to make things simple, we're rendering pages based on query strings to save them having to login to our portal. The user won't be logged in and will get a url sent to them that filters data based on the parameters given.

 

While there's no issue with rendering a page for a specific record with a form, we're using a subgrid within the form to show data from a related entity and as such, we can't use Metadata filters for this subgrid. I was hoping to use an Entity list instead to make use of the Metadata filter, but when rendering the list, it's displaying all records from the entity and I can't find a way to filter the list to the ID parameter in the query string. 

Is there a method around this? Thanks in advanced for any info. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Hi @ZakXrm ,

 

As far as I know, there is no possibility to apply filters based on the URL parameters for an entity list. Instead, I would advise you to use a different approach - create a web page that will act as your web API and query necessary data with javascript and then render a table using some library like datatables. You can find more about this approach and how to implement it in these posts (first and second) from Colin Vermander.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

3 REPLIES 3
Super User
Super User

Hi @ZakXrm ,

 

As far as I know, there is no possibility to apply filters based on the URL parameters for an entity list. Instead, I would advise you to use a different approach - create a web page that will act as your web API and query necessary data with javascript and then render a table using some library like datatables. You can find more about this approach and how to implement it in these posts (first and second) from Colin Vermander.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

Hey, thanks for the suggestion! I played around with this a little bit but couldn't really see how the base functionality changes all that much from what a subgrid list would provide, as we can't enable a Metadata filter and quickly checking through Datatables Api, I don't know if they offer something similar, unless I missed something. May just need to look into other libraries for this specific case. 

You don't need to filter it in datatables (however you can if you want to as you can apply default search). You can provide a filter parameter to your fetchxml query and receive already filtered results.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (36,976)