Skip to main content
Participant
October 14, 2024
Question

same cell has multiple calculations but only one seems to work

  • October 14, 2024
  • 1 reply
  • 300 views

I have an issue.

I was able to figure out how to subtract one cell from another. that is for EndTime--StartTime=total hrs

var v1 = getField("Endtime-1").value;

var v2 = getField("StartTime-1").value;

event.value=v1-v2;

 

And i was able to get the sum of total hrs for Sub-total Hours at the bottom of total hours 

Total Hrs - 2, Total Hrs - 3, Total Hrs - 4, Total Hrs - 5, TotalHrs-1

 

But when i enter numbers into start and end it seems to get screwed up. The 'total Hours' tends to keep the first numbeer that i enter in. whether that is in the 'Start' or 'End' cell. In this case the 'start or 8' was the firs tnumber.

Any help would be extremely helpful.

BTW if you can dumb down ther terminolgy for me I would appreciate it. When researching this i had to goodle some of the phrase cause i didn't know what they were. I can operate and learn the sogtware but the terminolgy sometimes is a bit much for me.

Anyway TIA

 

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
October 15, 2024

Check field calculation order, by selecting 'Prepare form' tool, then click on 'More' then 'Set field calculation order',

make sure 'Sub-total Hours' field is at the bottom because fields that calculate first should be at the top.