Hello Everyone.
Recently there was a change in database because of which one choice column was made multi select.
Before my filter was on a dropdown and its was working fine. But now I want to change it to a combo box.
My Current filter condition looks like:
If(
IsBlank(ComboBox2_1.Selected) && IsBlank(Dropdown1_13.Selected.Value) && IsBlank(DatePicker1.SelectedDate) && IsBlank(DatePicker1_1.SelectedDate),
Filter(PO, User().Email = 'Created By'.Email),
If(
DatePicker1.SelectedDate <= DatePicker1_1.SelectedDate,
Filter(
PO,
(IsBlank(ComboBox2_1.SelectedItems) || ComboBox2_1.Selected.Value in IS.Value) &&
(IsBlank(Dropdown1_13.Selected.Value) || Status.Value = Dropdown1_13.Selected.Value) &&
(IsBlank(DatePicker1.SelectedDate) || StartDate >= DatePicker1.SelectedDate) &&
(IsBlank(DatePicker1_1.SelectedDate) || EndDate <= DatePicker1_1.SelectedDate) &&
User().Email = 'Created By'.Email
),
Filter(PO, false) // Show no results when date range is invalid
)
)
What I want: If my dropdown, combo box and both date pickers are empty I want to show everything in the gallery and created by = current user.
If the start date > end date I should show an empty, if possible a message saying please enter correct filters or your start date is greater than end date.
Then if something is selected in dropdown, or multiple values are selected in combo box it should filter that in the gallery. Plus date pickers too.
What currently is happening: Everything is working fine except:
1) I want to show message : saying please enter correct filters or your start date is greater than end date.
This is not compulsory, currently it is showing empty gallery which is fine too.
2) If I select multiple entries in combo box it should filter that. Currently whatever I select latest its showing that in gallery. I know I have used combobox.Selected there instead of combobox.SelectedItems. This is because I was getting an error and was not able to find any substitute for it. So, please suggest me something for this.
Please suggest me a expression where combobox works. Gallery showing filters incorrect can be ignored for the moment.
If there any other flaws you see in the filter do tell me that too or if there is any other scope of improvement.
Thanks. 😄

Report
All responses (
Answers (