web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add All Filter in Gall...
Power Apps
Answered

Add All Filter in Gallery which should show all records

(2) ShareShare
ReportReport
Posted on by 156
I have a Gallery filter which is showing records based on combobox selections. If i select combobox value as My Request/Boss View, it shows respective records. Below is the code for the same. I need to add a All option in combobox which should show me all the records which is being shown in My Request and Boss View. May i know how to implement the same? 
 
Gallery Items
With(
    {
        _activerequests: SortByColumns(
            Filter(
                'Users',
                (Len('ETypeCB'.Selected.Value) = 0 || 'Employee Type'.Value = ETypeCB.Selected.Value) && (Len('LocationCB'.Selected.Name) = 0 || Location.Value = LocationCB.Selected.Name) && (Len(SwitchCB.Selected.Value) = 0 || (SwitchCB.Selected.Value = "My Request" && AdUser.Email = User().Email) || (SwitchCB.Selected.Value = "Boss View" && (Manager.Email = User().Email ))) && (StartsWith(
                    'First Name',
                    SearchBox.Text
                ) || StartsWith(
                    'Last Name',
                    SearchBox.Text
                ) || StartsWith(
                    Company,
                    SearchBox.Text
                ))
            ),
            "Modified",
            SortOrder.Descending
        )
    },
    SortByColumns(
        _activerequests,
        varsortcolumn,
        varsortdirection
    )
)
 
I have the same question (0)
  • Verified answer
    11manish Profile Picture
    4,376 Super User 2026 Season 2 on at
    Yes. You can add an "All" option quite easily without changing the overall structure of your Gallery formula.
     
    Try below : 
     
    With(
        {
            _activerequests: SortByColumns(
                Filter(
                    'Users',
                    
                    (Len(ETypeCB.Selected.Value) = 0 || 
                        'Employee Type'.Value = ETypeCB.Selected.Value
                    ) 
                    &&
                    
                    (Len(LocationCB.Selected.Name) = 0 || 
                        Location.Value = LocationCB.Selected.Name
                    ) 
                    &&
                    
                    (
                        Len(SwitchCB.Selected.Value) = 0 ||
                        SwitchCB.Selected.Value = "All" ||
                        (
                            SwitchCB.Selected.Value = "My Request" &&
                            AdUser.Email = User().Email
                        ) ||
                        (
                            SwitchCB.Selected.Value = "Boss View" &&
                            Manager.Email = User().Email
                        )
                    )
                    &&
                    
                    (
                        StartsWith('First Name', SearchBox.Text) ||
                        StartsWith('Last Name', SearchBox.Text) ||
                        StartsWith(Company, SearchBox.Text)
                    )
                ),
                "Modified",
                SortOrder.Descending
            )
        },
        
        SortByColumns(
            _activerequests,
            varsortcolumn,
            varsortdirection
        )
    )
     
  • Suggested answer
    Valantis Profile Picture
    7,236 Super User 2026 Season 2 on at
     
    Add this condition to your SwitchCB block:
     
    (SwitchCB.Selected.Value = "All" && (AdUser.Email = User().Email || Manager.Email = User().Email))
    So the full SwitchCB condition becomes:
    (Len(SwitchCB.Selected.Value) = 0 ||
     (SwitchCB.Selected.Value = "My Request" && AdUser.Email = User().Email) ||
     (SwitchCB.Selected.Value = "Boss View" && Manager.Email = User().Email) ||
     (SwitchCB.Selected.Value = "All" && (AdUser.Email = User().Email || Manager.Email = User().Email)))
     
    Then add "All" as an option in your SwitchCB combobox items.
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/
    💼 LinkedIn   ▶️ YouTube
     
  • Suggested answer
    Haque Profile Picture
    4,088 Super User 2026 Season 2 on at
    Hi @Poweruser32490,
     
    As a first step, let's bring the condition in the combox for "All".  We can do it by adding all this way for combobox Items property:
     
    ["All", "My Request", "Boss View"] //-- Array of string.
     
     
    Now, we need to add a condition that will check if the combox selection is All. So, logically if "All" is being selected, we will include the records that satisfy either "My Request" or "Boss View".
     
    (
        SwitchCB.Selected.Value = "All" && 
        (
            AdUser.Email = User().Email || 
            Manager.Email = User().Email
        )
    ) 
    
     
    Here is the full update for the same: 
    With(
        {
            _activerequests: SortByColumns(
                Filter(
                    'Users',
                    (Len('ETypeCB'.Selected.Value) = 0 || 'Employee Type'.Value = ETypeCB.Selected.Value) &&
                    (Len('LocationCB'.Selected.Name) = 0 || Location.Value = LocationCB.Selected.Name) &&
                    (
                        (SwitchCB.Selected.Value = "All" && (AdUser.Email = User().Email || Manager.Email = User().Email)) ||
                        (SwitchCB.Selected.Value = "My Request" && AdUser.Email = User().Email) ||
                        (SwitchCB.Selected.Value = "Boss View" && Manager.Email = User().Email)
                    ) &&
                    (
                        StartsWith('First Name', SearchBox.Text) ||
                        StartsWith('Last Name', SearchBox.Text) ||
                        StartsWith(Company, SearchBox.Text)
                    )
                ),
                "Modified",
                SortOrder.Descending
            )
        },
        SortByColumns(
            _activerequests,
            varsortcolumn,
            varsortdirection
        )
    )
    
     

     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 305 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 266

Last 30 days Overall leaderboard