Calculate work hours less break

  • kirpalttc
    Asked on February 9, 2021 at 4:09 PM

    Hi,

    For some reason my calculations based on conditions are not working in the form.

    It is for calculating hours of work subtracting 1/2 hours break or not.

    I have noticed that when I enter time and then hit backspace it starts to work.

    At times it works randomly.

    Please assist.

    Kirpal

  • Mike_G JotForm Support
    Replied on February 9, 2021 at 8:24 PM

    I have checked the form you linked and based on my understanding, you would like to get the total time range of a Time field in your form into another field but, 0.5 hours would need to be deducted on the total hours that are more than 5 hours.

    1612919345 602332319eba1 zt210209 194509 Screenshot 10

    To do that, you have passed the value of the Time field range into a Form Calculation widget.

    1612919453 6023329d2dbaa zt210209 200942 Screenshot 21

    And then, you have used the Form Calculation widget in your condition to get the total.

    1612919600 602333303a22a zt210209 201255 Screenshot 32

    Your calculation seems to be working, however, you would need to also toggle the AM/PM dropdown of the Time field.

    1612920083 602335134bd5a zt210209 202056 Screenshot 43

    Please give it a try and let us know if you need any further assistance.