cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

Re: Filter Gallery from CDS many to many relationship with multiple conditions

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
Highlighted
Community Support
Community Support

Re: Filter Gallery from CDS many to many relationship with multiple conditions

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.
Highlighted
Frequent Visitor

Re: Filter Gallery from CDS many to many relationship with multiple conditions

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

Highlighted
Frequent Visitor

Re: Filter Gallery from CDS many to many relationship with multiple conditions

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

Could you explain ?

Highlighted
Helper I
Helper I

Re: Filter Gallery from CDS many to many relationship with multiple conditions

@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.

Highlighted
Frequent Visitor

Re: Filter Gallery from CDS many to many relationship with multiple conditions

@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. 

Highlighted
Helper I
Helper I

Re: Filter Gallery from CDS many to many relationship with multiple conditions

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,052)