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 Apps
Unanswered

Gallery Help

(0) ShareShare
ReportReport
Posted on by 394 Super User 2024 Season 1

Dear All,

 

I want to create a filter on a gallery which will filter on the following;

 

Drop Down Selection - Status when selected - Status Column

If "All" is selected from drop down do not filter / status column

If text is entered in a box filter form details with start with

If nothing select just present all data

 

I cannot seem to get it working properly, code below.

 

Filter(
'SharePoint List',
varReset,
And(
If(
searchStatus.SelectedText.Value = "All", true,
// If "All" is selected, do not filter on status.
Status.Value = searchStatus.SelectedText.Value // Only filter by status if specific status is selected
),
StartsWith(FormColumn, searchForm.Text)
)
)

 

Categories:
I have the same question (0)
  • MIA27 Profile Picture
    2 on at

    You can use OR operator to define 

    Example :

     

    Filter(
    DataTableName,
    (
    Len(Status.Selected.Value) = 0 || Status.Selected.Value) = "ALL" ||
    FormColumn = Status.Selected.Value

    )

    )

     

    I gave an idea, how all 3 criteria can be combined,

    Hope it helps

     

  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    I have managed to get it working better with this however the following doesnt work with it? StartsWith(
    Form,
    searchForm.Text). I need to have a search in a text box too as well.

  • MIA27 Profile Picture
    2 on at

    can you please share your full code(related to the requirement), so that modification can be suggested.

  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    Thank you for the direction and help on this. Here is the code:

     

    filter(
    'SharePoint List',
    (searchStatus.SelectedText.Value = "All" || Status.Value = searchStatus.SelectedText.Value || StartsWith(
    Form,
    searchForm.Text
    ))
    )

  • MIA27 Profile Picture
    2 on at

    filter(
    'SharePoint List',
    (searchStatus.SelectedText.Value = "All" || Len(searchStatus.SelectedText.Value)=0 ||

    searchStatus.SelectedText.Value in SharePointColumnName)

    )

     

    The IN operator will be better instead of Startwith, as where ever that alphabet/digit will be , it will filter.

    Startwith has disadvantage that the user has to remember the start of the selection

     

    Hope it helps

     

     

     

  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    I cannot seem to get the searchStatus part to work with the drop down? The first two parts for the drop down work fine. When introduce the search text box it ignores it?

  • MIA27 Profile Picture
    2 on at

    could you please share the code you are applying,

    as in the example I put was having all field name same, I hope you have applied the correct one.

    Because DropDown control name and searchTextbox name should differ.

     

    Anyhow, please share the code and then we will see

     

  • WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    @DLCaterhamSch ,

    As referenced - this is also being dealt with on your other identical post.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard