While entering a leave request in a read-only grid I am entering the same date two times with different leave type (which is allowed). I need to get the leave hours entered for the same date as I need to give a validation message if the sum of leave hours exceed 8 hrs for the same day. How can I achieve this?
In the sample data given below, I want to extract the requested hours where the leave dates are same:
[LAST_UPD_USR:ehelen,LAST_UPD_TS:10/14/2022 5:55 AM GMT,CREATE_USR:ehelen,CREATE_TS:10/14/2022 5:53 AM GMT,IS_ACTIVE:true,APPROVED_HRS:,REQUESTED_HRS:5,LEAVE_TYPE:Sick Leave,LEAVE_DATE:10/26/2022,FK_STAFF_ID:113,FK_EMPLOYEE_LEAVE_REQUEST_ID:19,EMPLOYEE_LEAVE_REQUEST_DETAILS_ID:1];
[LAST_UPD_USR:ehelen,LAST_UPD_TS:10/14/2022 5:55 AM GMT,CREATE_USR:ehelen,CREATE_TS:10/14/2022 5:53 AM GMT,IS_ACTIVE:true,APPROVED_HRS:,REQUESTED_HRS:8,LEAVE_TYPE:Vacation Leave,LEAVE_DATE:10/20/2022,FK_STAFF_ID:113,FK_EMPLOYEE_LEAVE_REQUEST_ID:19,EMPLOYEE_LEAVE_REQUEST_DETAILS_ID:2]
Thanks,
Brinda Sateesh
Discussion posts and replies are publicly visible
You can build a simple logic in SaveInto of a grid to loop through each item and sum up the hours for same date, then you can put the validation message if the sum is coming more than 8 hours for the same day. Hope you can get started building the logic and you will see the result.
Hi Durgesh,
Thanks for your reply? How to achieve this?