I have a canvas app connected to a Sharepoint list. I have a data table called datatable3. This has two columns: endproduction time and addedby. Endproductiontime is text.
On the same screen as the data table, I have a date picker called datepicker1. When the user clicks a button called barcodescanner2_1, it's onscan property is: set(barcodehistory,barcodescanner2_1.value).
Once the user scans a barcode, I want the data table to filter to only matching barcodes of that type that were scanned between today and the last 60 days.
For some reason, when I choose 12/1/2022 as the date in the datepicker, the table is sorted perfectly and returns the correct results ranging from October - December. When I choose 1/1/2023, however, it only returns one result, which is 11/21/2022. The table will not return any results after 11/21/2022. Nothing scanned in December 2022 or January 2023 is populating in the table.
Here's the formula:
SortByColumns(
Filter(
AddColumns(
'Data',
"_EndProductionTimeDATE",
DateTimeValue(EndProductionTime)
),
DateTimeValue(EndProductionTime) < DatePicker1.SelectedDate &&
DateTimeValue(EndProductionTime) >
DateAdd(
DatePicker1.SelectedDate,
-60,
Days
) &&
Title in Barcodehistory
),
"_EndProductionTimeDATE",
Descending
)