cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filtering galleries from list infos

Hi guys,

 

I'm having a bit of trouble filtering a gallery for on of my apps. Basically, I have a dropdown with names that already filters my gallery. But I also want to filter with an other condition coming from a SharePoint list that I have trouble coding. In my app, every name is linked with tasks and each tasks with 7 prerequisites (just yes or no conditions). Maybe you guessed it, I want to add another filter that allows me to display only the tasks in my gallery when at least 1 of the prequisites has not been met.

 

I tried with "and" and "or" but I cannot make it work.

 

Does someone has an idea on how to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

Can you try to update your expression to below format?
 
Filter(DataSource, Column1 = Dropdown.Selected.Value && Or(Text(PreReq1) = "No", Text(PreReq2) = "No",Text(PreReq3) = "No",Text(PreReq4) = "No",Text(PreReq5) = "No",Text(PreReq6) = "No",Text(PreReq7) = "No")
 
Here Data source is the name of data source with column Column1 to filter dropdown results. PreRe1 - PreReq7 are the name of columns which holds the value for Yes/No. I am assuming that it is a Yes/No type column.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

Can you try to update your expression to below format?
 
Filter(DataSource, Column1 = Dropdown.Selected.Value && Or(Text(PreReq1) = "No", Text(PreReq2) = "No",Text(PreReq3) = "No",Text(PreReq4) = "No",Text(PreReq5) = "No",Text(PreReq6) = "No",Text(PreReq7) = "No")
 
Here Data source is the name of data source with column Column1 to filter dropdown results. PreRe1 - PreReq7 are the name of columns which holds the value for Yes/No. I am assuming that it is a Yes/No type column.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share more details about the Filter formula you used in your app?

Does these 7 prerequisites represents 7 individual Yes/No type column in your SP List?

 

I suppose that these 7 prerequisites represents 7 individual Yes/No type column in your SP List, and you want to display only the tasks in your gallery when at least 1 of the prequisites has not been met (PrerequisiteColumn set to No), is it true?

 

I have made a test on my side, please consider take a try with the following Filter formula:

Filter(
         'YourSPList',
          NameColumn = Dropdown1.Selected.Value,
          PrerequisiteColumn1 = false || PrerequisiteColumn2 = false || PrerequisiteColumn3 = false || PrerequisiteColumn4 = false || PrerequisiteColumn5 = false || PrerequisiteColumn6 = false || PrerequisiteColumn7 = false
)

or

Filter(
         'YourSPList',
          NameColumn = Dropdown1.Selected.Value,
          PrerequisiteColumn1 = 0 || PrerequisiteColumn2 = 0 || PrerequisiteColumn3 = 0 || PrerequisiteColumn4 = 0 || PrerequisiteColumn5 = 0 || PrerequisiteColumn6 = 0 || PrerequisiteColumn7 = 0
)

 

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

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