7 Replies Latest reply on Oct 25, 2013 2:35 AM by try67

    Best way to do calculation depending on drop down box selections


      I have a timesheet set up that employees choose from two different drop down fields which department they worked in and which station they worked at for each start and end time section. What I am trying to do is have a summary table on the bottom of the timesheet that calculates the time spent for each combination.


      Timesheet snapshot.png


      The departments are N&S, P and A and our stations are WN, ZO, LR and FM so the summary table would look like this:




      I have three sections of start and end times with each one calculating their time in separate fields named M1, M2 and M3.  What I am trying to set up is an if statement for each cell in the summary table. For example:

      If 'deptmonday1' = N&S and 'stationmonday1' = WN

      then x = M1


      if 'deptmonday2' = N&S and 'stationmonday2' = WN

      then y = M2


      if 'deptmonday3' = N&S and 'stationmonday3' = WN

      then z = M3

      so cell 'WNN&S' = x + y + z


      Can someone help me with the scripting for my if statments or is there an easier way to figure this out? I am using Acrobat Pro.