calculate time-in and out using the input table dropdown

  • princess5510
    Asked on February 11, 2021 at 3:01 AM

    Alex,

    My company wants me to enter the time by a drop down column, since it will be hard and time consuming for employees to enter time in and out in three separate fields.

    Is it possible to calculate time different from drop down columns in an input table?

    Just like this form https://www.jotform.com/form/210404303329442#preview ?

    Hope I have clarified.

    Thanks.

  • Richie JotForm Support
    Replied on February 11, 2021 at 3:20 AM

    It is possible to use conditions on the input table to get the values of the dropdown to a filled or another input table.

    For example, if you want to get the Tuesday in and out into another field.

    1613031185 6024e711130d1 1 Screenshot 10

    You may then use the form calculation widget to get the total hours worked.

    1613031278 6024e76e3c181 1 Screenshot 21

    Sample form:https://form.jotform.com/210411553278955

    1613031600 6024e8b0126d3 1 Screenshot 32

    Please check it out and let us know how it goes.

  • princess5510
    Replied on February 16, 2021 at 2:25 AM

    Thank you so much richie, this help alot.

    However, if when I changed the drop down column timings in terms of 15 minutes gap such as 12:00, 12:15 and 12:30.

    The calculations between the timings mess up.

    When i tried to calculate for tuesday hours, inserting clock in time as : 9:45 am and clock out as 3:15 pm,

    it shows the total hours as 6.30 where as it should show 5.30 hours only.

    Can you check?

    https://www.jotform.com/build/210333129767455#preview


  • Richie JotForm Support
    Replied on February 16, 2021 at 4:03 AM

    I have been testing and it seems we would be using the 24 hour format for the calculation to work and we should be using conditions instead of directly using the form calculation widget.

    Here is a full explanation by my colleagues at this ticket https://www.jotform.com/answers/2635495-

    My colleagues sample form you may clone :https://form.jotform.com/203372694155963

    Kindly check the ticket and let us know how it goes.

  • princess5510
    Replied on February 20, 2021 at 4:22 AM

    I tried cloning your colleagues form

    but however i face similar issue.

    1613812888 6030d4982233e Screenshot (93) Screenshot 10

    When i entered the time 8:30am to 2:15 pm

    it calculated the time as 14 hours???? where as it should be only around 6 hours.


    Can you clarify please?

    Thankyou

  • Richie JotForm Support
    Replied on February 20, 2021 at 8:53 AM

    My apologies, kindly test this sample form https://form.jotform.com/203377081105953

    You may clone the form by following this guide:https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

    Let us know how it goes.

  • princess5510
    Replied on February 21, 2021 at 12:36 PM

    This works great.

    However in my form i dont need the options for 'LEAVE' and 'LUNCH'

    is it possible to use the same form and eliminate these two rows from the 'total hours worked each day-week 1'?

    this is the form :https://www.jotform.com/build/210463600497453#preview

    i tried eliminating both these drop down columns in a new form i created but there seems an error in the base number calculations

    1613928970 60329a0a881a4 Capture Screenshot 10

    what should be the code for the th base number if i eliminated leave and lunch?

    hope you understand.

    thank you.

  • VincentJay
    Replied on February 21, 2021 at 5:11 PM

    If you want to remove the Leave and Lunch, please follow this screencast guide:

    1613945355 6032da0bda510 vbde53 Screenshot 10

    If you want to hide it using custom CSS code, please let us know.

  • Richie JotForm Support
    Replied on February 22, 2021 at 12:10 PM

    I have checked your form https://www.jotform.com/form/210524397919059 and it seems the calculation conditions is working correctly.

    1614013779 6033e5530306b 1 Screenshot 10

    Please test your form again and let us know how it goes.

  • princess5510
    Replied on February 22, 2021 at 1:00 PM

    https://www.jotform.com/build/210524397919059#preview

    Hi Richie,

    I have used all the same conditions but the hours are still not being calculated.

    The total hours less lunch field in the results table is still empty.

    why is this issue happening?

    could you check please.

    thank you sm in advance.

  • VincentJay
    Replied on February 22, 2021 at 3:56 PM

    Hello,

    I checked your form and it is working fine on my end. Could you please share a screenshot of the issue?

    1614027343 60341a4fbd8f7 vds3622 Screenshot 10