Hi @Anonymous
Nothing really wrong with the code I can see, but Date Filters, no matter how you structure them are not delegable, Today() is not really the problem.
SortByColumns(
Filter(
BMObservationList,
RoomNumber = Gallery1.Selected.RoomNumber,
DateValue(
Text(
Time,
DateTimeFormat.ShortDateTime24
)
)
= Today()
),
"Time",
Ascending
)
We can do this another way however - firstly a collection (I assume there are never more than 2000 items for a room). Put this in the navigation code to the list.
ClearCollect(
colBookings,
Filter(
BMObservationList,
RoomNumber = Gallery1.Selected.RoomNumber
)
)
You could also use ShowColumns to just pick the fields you needed.
Now your list
SortByColumns(
Filter(
colBookings,
DateDiff(
Time, //you should rename this - Time is a reserved word
Now(),
Days
) = 0
),
"Time",
Ascending
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.