Hello All,
I am new to Power Apps and trying to get the sorting function to work.
I have an app that was built and originally only had 2 days to select from, and it was requested to add another day.
I can get it to sort if only one day is selected, and also if all 3 are selected.
How can I get this to sort by 2 fields selected; IE if tuesday and wednesday are selected should show all available tuesday and wednesday slots. Attached are code I am currently using.
----------------------------
If(TueCheckBox.Value = true And WedCheckBox.Value = false And ThurCheckBox.Value = false,
If(month_dropdown.Selected.Value = "All",
SortByColumns(Filter('Massage Bookings', Weekday(Start_x0020_Time) = 3 And Status.Value =
"Open" And DateDiff(Now(), Start_x0020_Time) >= 0 ),"Start_x0020_Time"),
SortByColumns(Filter('Massage Bookings', Weekday(Start_x0020_Time) = 3 And Status.Value =
"Open" And DateDiff(Now(), Start_x0020_Time) >= 0 And _Month = Month(Start_x0020_Time) ),"Start_x0020_Time")),
If(TueCheckBox.Value = false And WedCheckBox.Value = true And ThurCheckBox.Value = false,
If(month_dropdown.Selected.Value = "All",
SortByColumns(Filter('Massage Bookings', Weekday(Start_x0020_Time) = 4 And Status.Value =
"Open" And DateDiff(Now(), Start_x0020_Time) >= 0 ),"Start_x0020_Time"),
SortByColumns(Filter('Massage Bookings', Weekday(Start_x0020_Time) = 4 And Status.Value =
"Open" And DateDiff(Now(), Start_x0020_Time) >= 0 And _Month = Month(Start_x0020_Time) ),"Start_x0020_Time")),
If(TueCheckBox.Value = false And WedCheckBox.Value = false And ThurCheckBox.Value = true,
If(month_dropdown.Selected.Value = "All",
Filter('Massage Bookings', Weekday(Start_x0020_Time) = 5 And Status.Value = "Open"
And DateDiff(Now(), Start_x0020_Time) >= 0 ),
Filter('Massage Bookings', Weekday(Start_x0020_Time) = 5 And Status.Value = "Open"
And DateDiff(Now(), Start_x0020_Time) >= 0 And _Month = Month(Start_x0020_Time))),
If(Instructor_dropdown.Selected.Value = "Doesn't matter",
If(TueCheckBox.Value= true And WedCheckBox.Value = true And ThurCheckBox.Value = true,
If(month_dropdown.Selected.Value = "All",
SortByColumns(Filter('Massage Bookings', Status.Value = "Open" && DateDiff(Now(), Start_x0020_Time)
>= 0),"Start_x0020_Time"),
SortByColumns(Filter('Massage Bookings', Status.Value = "Open" And DateDiff(Now(), Start_x0020_Time)
>= 0 And _Month = Month(Start_x0020_Time)),"Start_x0020_Time")))))))
Any Help would be greatly appreciated.
Thank you,
Paul