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.
Solved! Go to Solution.
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.
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.
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.
User | Count |
---|---|
9 | |
7 | |
7 | |
5 | |
2 |
User | Count |
---|---|
20 | |
19 | |
19 | |
13 | |
4 |