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 !

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,143)