Calculate work hours less break

  • Profile Image
    kirpalttc
    Asked on February 09, 2021 at 04: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

  • Profile Image
    Mike_G
    Answered on February 09, 2021 at 08: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

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

    1612919453_6023329d2dbaa_zt210209_200942

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

    1612919600_602333303a22a_zt210209_201255

    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

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