
Announcements
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
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.