
Announcements
Hello Everyone,
Good day!
I need help regarding getting the rows/entries in last 12 hours, 24 hours, and 96 hours.
I use code below :
Set(
dataLast12Hours,
Filter('Datasource', Created >= DateAdd(Today(), -12))
);
Set(
dataLast24Hours,
Filter('Datasource', Created >= DateAdd(Today(), -24))
);
Set(
dataLast92Hours,
Filter('Datasource', Created >= DateAdd(Today(), -92))
);
ClearCollect(
colLastEntries,
{
ID: 1,
Title: "Last 12 Hours",
Subtitle: CountRows(dataLast12Hours) & " Entries"
},
{
ID: 2,
Title: "Last 24 Hours",
Subtitle: CountRows(dataLast24Hours) & " Entries"
},
{
ID: 3,
Title: "Last 92 Hours",
Subtitle: CountRows(dataLast92Hours) & " Entries"
}
)
I get 6 entries on this. But when I used -96 or -24 I get same 6 entries which is incorrect.
I want to get based on created column on my sharepoint list.
Thank you in advance.
To diagnose this, I'd do the following. Taking the following formula:
Set(
dataLast92Hours,
Filter('Datasource', Created >= DateAdd(Today(), -92))
);
If you go to the variables pane and inspect the contents of dataLast92Hours, do you see more than 6 rows?
If you only see 6 rows, if you add a gallery control and set the Items property to the Filter statement, do you see all the expected rows in the gallery?