Hi
I have an app which logs sick leave for users.
It stores the leave in a SharePoint list.
Each row in the list has
User,StartDayOfSickness, EndDayOfSickness
(End can be equal to Start - for one day - but not earlier than Start)
In the App I allow HR to add sickness for a user by having a Gallery to pick the user and then two DatePickers (dpStart, dpEnd)
Is there a way to disable the Submit button if HR are trying to add days that already are in the list?
I realise this could be very complex.
If leave exists for
Me,17/05/2023,17/05/2023
Me,18/05/2023,19/05/2023
Me,22/05/2023,25/05/2023
and then in the form I try to add
dpStart 19/05/2023
dpEnd 19/05/2023
then it should say "Leave exists already"
Or if I try to add
dpStart 25/05/2023
dpEnd 30/05/2023
then the same message that "Leave exists already"
You would have to loop through the Date Range and the items in the list and it's a bit beyond me!
Thanks
P