I build a time tracker similar to the one in the time tracker template tadabase provides. To comply with german laws I had to change a few things. My version differs from the template in that its supposed to be only one entry per day with a break time. What I did is instead of using an action rule to clock out I’m using a form with only a field for the breaktime. I set the clock out via record rules in the form. I have several issues with that and I think they all come down to that the formula to calculate the working hours is calculated to late.
First users could get negative working hours when the break is to long. So I want to validate against that. The problem is that I’m unable to get the validation rule working. I just want to check that my working hours formula is positive but the validation always fails.
The other thing is that I need to notify the user and HR in case of Labor law violations. I’ve setup a decision field that I want to check in certain conditions. E.g. betweeen 6 and 9 working hours people need to take at least an 30 minute break, a 45 minute break betweeen 9 and 10 hours and I always want to check it when people worked for more than 10 hours a day.
I tried record rules in the form but that didn’t work at all and even table rules didn’t work properly since they only apply after the record is edited a second time. For the validation I even tried setting a field value with a pipe since record rules in forms are able to run before validation rules. Didn’t work either.