cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
barlowse Advocate II
Advocate II

Add the ability to CDS Views - to filter by a parameter

Being able to use Views defined on the CDS entities is great for Power Apps, however, you still have to fetch all your rows and use filtering within the app to limit the data presented to the user. I would like to be able to pass a parameter to the CDS view in order to limit the rows fetched from the server.

5 REPLIES 5
SKH19 Impactful Individual
Impactful Individual

Re: Add the ability to CDS Views - to filter by a parameter

You can customize your view to filter down to specific records. The filter is found in the bottom right of the view creator. 

 

Annotation 2019-12-16 105547.png

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Highlighted
barlowse Advocate II
Advocate II

Re: Add the ability to CDS Views - to filter by a parameter

Yes - the filtering is available - but it is a static filter - I am looking for a dynamic filter - where I can pass a variable from a Pwer App to the View.

frederikbisback Advocate IV
Advocate IV

Re: Add the ability to CDS Views - to filter by a parameter

Somebody, I need to same. I need to have the possibility to add a variable name. So that I can pass a value from the powerapps selection to the view. Thanks  

gdavenport
Frequent Visitor

Re: Add the ability to CDS Views - to filter by a parameter

This feature would be extremely helpful

EricRegnier Solution Sage
Solution Sage

Re: Add the ability to CDS Views - to filter by a parameter

Hi @barlowse,

It is not possible out-of-the-box to have a dynamics filter in the entity list page (clicking the entity from the sitemap). For what exact scenario are you trying to have a dynamics filter? There are probably a few workarounds, for instance:

  • If you want to dynamics filter a view for a lookup field that it's possible with the addCustomFilter function

 

formContext.getControl(arg).addCustomFilter(filter, entityLogicaName)

 

  • For a subgrid on a form, then you can dynamics filter based on the related record
  • Or you can filter a subgrid on a form with SetParameter but it is an unsupported customization
  • You can have some pre-build views and toggle them as need be

Hope this helps

 

 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Users online (7,662)