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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,612)