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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering gallery in p...
Power Apps
Unanswered

Filtering gallery in powerapps

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

So I have some filters in powerapps to my gallery,

 

I've got a text field and then a drop down status - pretty simple

 

On my gallery items I have the following;

 

SortByColumns(
Filter(
'Request For Support',
(StartsWith(
Title,
TextInput1.Text
) || StartsWith(
'Created By'.Email,
TextInput1.Text
) || StartsWith(
ID,
TextInput1.Text
)) && ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank())

),
"Created",
SortOrder.Descending
)

 

This works fine and I'm happy with it, however I want to expand it a little and have a filter date range too.

 

I tried using the below which I got from a tutorial 

 

And(
Or(
IsBlank(dpStartDate.Value),
'Created' >=dpStartDate.Value
),
Or(
IsBlank(dpEndDate.Value),
'Created' >=dpEndDate.Value
)
)

 

But I cant seem to get it to work with the code that I have already in place for my gallery item, would someone be able to point me in right direct?

 

Thanks

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Hi @Matt2024 

     

    Try this formula,

     

    SortByColumns( 
    Filter(
    'Request For Support',
    (StartsWith(Title, TextInput1.Text) || StartsWith('Created By'.Email, TextInput1.Text) ||
    StartsWith(ID, TextInput1.Text)) &&
    ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank()) &&
    'Created' >= dpStartDate.SelectedDate && 'Created' <= dpEndDate.SelectedDate ),
    "Created", SortOrder.Descending
    )

    (Or)

     

    SortByColumns(
     Filter(
     'Request For Support',
     (StartsWith(Title, TextInput1.Text) || StartsWith('Created By'.Email, TextInput1.Text) || 
    StartsWith(ID, TextInput1.Text)) && ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank()) && (IsBlank(dpStartDate.SelectedDate) || 'Created' >= dpStartDate.SelectedDate) && (IsBlank(dpEndDate.SelectedDate) || 'Created' <= dpEndDate.SelectedDate) ), "Created", SortOrder.Descending )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard