cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Angiellyn01
Regular Visitor

Filtering a gallery based on another gallery and a condition

Hi guys,

 

I need your help again.

I have 2 galleries in my App, the gallery on the left is called FilterGallery which contains a list of categories from a SharePoint list name CategoryList. The gallery on the right is ViewGallery which contains the list from another SharePoint list name BD Tracker.

2 galleries.png

 

I am using the FilterGalley to filter ViewGallery according to the selected category. I have found a formula online and it works perfectly but now I want to add this condition ('BD Tracker'.Priority="High") on the filter formula . 

I tried adding it on the IF condition but it gave me error.

 

This is the current "working" formula used: 

Angiellyn01_0-1660624822685.png

I appreciate all the help. Thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions

SortByColumns(If(type="All Projects",'BD Tracker',
    If(type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id && Priority = "High")//If Priority is choice type then Priority.Value = "High"
,
    If(type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
   If(type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    Filter('BD Tracker',type in CategoryList.Value)))))))))))),"Project", Ascending)

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

5 REPLIES 5
NandiniBhagya20
Solution Sage
Solution Sage

Hi,

can you please copy and paste the formula here so that it will be easier for me check it


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Angiellyn01
Regular Visitor

@NandiniBhagya20 

 

here is the formula i found online:

 

SortByColumns(If(type="All Projects",'BD Tracker',
    type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    Filter('BD Tracker',type in CategoryList.Value)),"Project")

 

SortByColumns(If(type="All Projects",'BD Tracker',
    If(type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id && Priority = "High")//If Priority is choice type then Priority.Value = "High"
,
    If(type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
   If(type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    Filter('BD Tracker',type in CategoryList.Value)))))))))))),"Project", Ascending)

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

SortByColumns(If(type="All Projects",'BD Tracker',
    If(type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id && Priority = "High")//If Priority is choice type then Priority.Value = "High"
,
    If(type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
   If(type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    If(type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
    Filter('BD Tracker',type in CategoryList.Value)))))))))))),"Project", Ascending)

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Angiellyn01
Regular Visitor

@NandiniBhagya20  that works perfectly! thank you so much..

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,564)