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

Show All Gallery Items

Hi All,

 

I have a gallery that filters on four drop boxes one after the other using this formula:

 

SortByColumns(Filter('[dbo].[SOTTABLE]',StartsWith(Company,Dropdown1_1.Selected.Result),StartsWith(Department,Dropdown1_35.SelectedText.Value),StartsWith(Location,Dropdown1_36.SelectedText.Value),DatePicker1.SelectedDate),"Date",Descending)

 

Gallery Formulas.JPG

 

Dropdown1_1 is the Company box

Dropdown1_35 is the Department box

Dropdown1_36 is the Location box

 

It all works fine however -

 

How do I modify the formula if Company = "All Companies" to display all records across the entire table?

Also the user may which to choose a Company but require to see all entries within Departments by selecting "All Departments"

 

Many Thanks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @MBlythe2020 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @MBlythe2020 ,

The code below should do it, but I am also wondering what the reference to the DatePicker relates to as you have not compared it with anything.

SortByColumns(
   Filter(
      '[dbo].[SOTTABLE]',
      (
         Dropdown1_1.Selected.Result = "All Companies" ||
         StartsWith(Company,Dropdown1_1.Selected.Result)
      ) &&
      StartsWith(Department,Dropdown1_35.SelectedText.Value) &&
      StartsWith(Location,Dropdown1_36.SelectedText.Value) &&
      DatePicker1.SelectedDate //equals what?
   ),
    "Date",
    Descending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

WarrenBelz
Super User
Super User

Hi @MBlythe2020 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn 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.

Top Solution Authors
Top Kudoed Authors
Users online (1,583)