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

Filter Gallery from CDS many to many relationship with multiple conditions

Hi Community,

I'm new on PA and I'll appreciate your help to figure out how can I Filter my gallery with multiple conditions based on related entity

to be more conveniently I attached a draw where I explained my use case :

PA_MTM_Q.jpg

 
1 ACCEPTED SOLUTION

Accepted Solutions

Hello Thanks for your response,

I had a delegation issue with this solution, so to avoid this delegation issue, I created 4 filtred views on CDS based on flavours (As I have only 4 flavours) and I filtered this views on PA, so It works fine and without delegation issue..

 

Thanks for your help !

View solution in original post

6 REPLIES 6
v-xida-msft
Community Support
Community Support

Hi @BenzPA ,

Based on the needs that you mentioned, I think Filter function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Gallery to following:

Filter(
       LookUp(Flavors, Name = "Lemon").Drinks,
       Volume = "500 ml",
       Type = [@Type].Type5
)

Note: The Type wrapped with [@] represents the Option Set Name within your CDS Entity.

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Thanks for your response,

I had a delegation issue with this solution, so to avoid this delegation issue, I created 4 filtred views on CDS based on flavours (As I have only 4 flavours) and I filtered this views on PA, so It works fine and without delegation issue..

 

Thanks for your help !

View solution in original post

I Don't understand how "LookUp(Flavors, Name = "Lemon").Drinks" could work. and especially with ".Drinks".

Could you explain ?

@Jonathan92  did you ever figure out how that works? Running into that problem now. When I do "LookUp(Flavors, Name = "Lemon").Drinks" I get only one record returned instead of multiple.

@jacktransform unfortunately, there are multiple issues that I could not solve on Power Apps, and this one included. This is not anymore a problem for me as I am now on working as a fullstack dev JS. 

jacktransform
Helper III
Helper III

@BenzPA @v-xida-msft 

Just like Jonathan, I too am running into problems with the LookUp function. When I do "LookUp(Flavors, Name = "Lemon").Drinks" I get only one record returned instead of multiple. How are you able to return all the records in "Drinks" that have "Lemon" as part of its flavor?

 

Thanks!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,618)