How can I calculate the time in the attached form without having to mess up the existing calculations?

  • Profile Image
    princess5510
    Asked on February 21, 2021 at 12:38 PM

    Hi.

    This is the form im currently working on:

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

    I love how it calculated time perfectly. However i want to eliminate the rows of 'Leave' AND 'Lunch' break in the total hours calculation input table.

    Is it possible to acheive that and not mess up the coding in the form?

    Please help.


    Thankyou

  • Profile Image
    Mike_G
    Answered on February 21, 2021 at 10:28 PM

    I have updated a cloned version of the form you linked based on your requirements.

    Here's the link to the cloned version: https://form.jotform.com/210517035598962

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

  • Profile Image
    princess5510
    Answered on February 22, 2021 at 01:48 AM

    This works great. I used all the same conditions on my form but somehow, my 'Clock In' text box of the results table is unable to extract information from Day 1 Field.

    1613976454_603353868006c_1.PNG

    I select the time as follows and then;

    1613976478_6033539e791df_2.PNG

    This is what is happening.

    1613976497_603353b150edc_3.PNG

    Here is the snap of all of my conditions.

    Where could i be wrong?

  • Profile Image
    gerardw
    Answered on February 22, 2021 at 04:25 AM

    I checked your form https://form.jotform.com/210463600497453 and the results table is populating correctly:

    1613985897_6033786941df8_screencas220220

    Please check and let us know if you are still facing any issues.

  • Profile Image
    princess5510
    Answered on February 22, 2021 at 10:10 AM

    Thanks alot Gerad but the form im working on is as follows:

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

    The calculation doesnt seem to be working for it.

    Do you know what can be the issue?

  • Profile Image
    Welvin
    Answered on February 22, 2021 at 11:16 AM

    I've fixed that. You should first set it to calculate the values, not copy. That way, it will calculate the values as numbers, not texts.

    1614010551_6033d8b7ea8d5_

    Thanks

  • Profile Image
    Welvin
    Answered on February 22, 2021 at 11:18 AM

    I'm sorry, but if you wish to get the total on the Results Table - Week 1 > Total Hours Less Lunch column, you would need to set up another conditional logic. Let us know if you can't get that to work. We'll be happy to check your settings, and help you correct it.

    Thanks

  • Profile Image
    princess5510
    Answered on February 22, 2021 at 01:10 PM

    https://www.jotform.com/build/210524397919059/settings/conditions

    this is form im working on and i cant get it to calculate the total hours in the less lunch column or the sunday hours?


    ive cloned all the same conditions of this form:

    https://www.jotform.com/build/210521126737448/settings/conditions


    pls tell me where im wrong

  • Profile Image
    Welvin
    Answered on February 22, 2021 at 03:12 PM

    It's related to conditional logic. You were copying the value instead of calculating it as a number. When set it to copy, the value is pass as text, not a number. I have fixed that.

    When you create the condition, you should do it like this first:

    1614024717_6034100d90eaa_

    You could see the field is Black/White. That means you are calculating numeric values. If it's Brown/White, that means it is Text.

    1614024664_60340fd8b451e_