Good Afternoon! Y'all. So, I have this app that is taking data from a sharepoint list (Appointments) and displays appointments that are checking in and checked out. All I want to do is to show only the present day/Current day appointments. How can I achieve that?
Here is my App OnStart code:
//ClearCollect(colAppointmentsWithoutRN,Filter(Appointments, DateValue('Appointment Day and time') = Now()));
//ClearCollect(colAppointmentsWithoutRN,Appointments);
ClearCollect(
colAppointmentsWithoutRN,
Appointments
);
ClearCollect(
colAppointments,
ForAll(
Sequence(CountRows(colAppointmentsWithoutRN)),
Patch(
Last(
FirstN(
colAppointmentsWithoutRN,
Value
)
),
{RowNumber: Value}
)
)
);
Set(
varRowsPerPage,
6
);
Set(
varCurrentPage,
1
);
Set(
varTotalPages,
RoundUp(
IfError(CountRows(colAppointments) / varRowsPerPage,0),
0
)
);
Set(
isTimerStart,
true
);
Set(
varStartTimer,
true
);
// Gallery Code Ends here
Set(
varDistVARep,
Distinct(
colAppointments,
'VA Representative'
)
);
ClearCollect(
colAppointmentsWithDiff,
AddColumns(
colAppointments,
"TimeDifference",
DateDiff(
'Check-in time',
'Checkout time',
TimeUnit.Minutes
)
)
);
Set(varTotalTimeDifference, Sum(colAppointmentsWithDiff, TimeDifference));
Set(
varTotalRep,
CountRows(varDistVARep)
);
Set(
varTotalAppointments,
CountRows(colAppointments)
);
Set(
varTotalCheckIn,
CountRows(
Filter(
colAppointments,
Status.Value = "Checked-in"
)
)
);
Set(
varTotalCheckOut,
CountRows(
Filter(
colAppointments,
Status.Value = "Checked-out"
)
)
);
Set(
varCheckInPercent,
IfError((varTotalCheckIn / varTotalAppointments),0) * 100 & " %"
);
Set(
varCheckOutPercent,
IfError((varTotalCheckOut / varTotalAppointments),0) * 100 & " %"
);
Clear(colPiCharData);
Collect(
colPiCharData,
{
Status: "Check In",
Count: varTotalCheckIn
}
);
Collect(
colPiCharData,
{
Status: "Check Out",
Count: varTotalCheckOut
}
);
And here is the gallery items property code:
Filter(
colAppointments,
RowNumber <= (varRowsPerPage * varCurrentPage) && RowNumber > (varRowsPerPage * varCurrentPage) - varRowsPerPage)