1 Reply Latest reply on Jun 12, 2016 11:55 PM by bigtom

    Calculation for cumulative hours


      I am a novice to FM and have done an extensive search to help with my problem, but to no avail.


      I am currently trying to write a script (I think I need a script and not a calculation) that will record and display the cumulative hours of engines on oil drilling equipment.


      I am having problems with my search function.  I want the script to perform a broad search to find the relevant power supply units (PS#) and then go to a particular Event ID# so that it can then get variables from that ID and the previous dated record and do the relevant calculations.  However, I am lacking the knowledge as to exactly how to do that.  At the moment, the script finds all the matching power supply units, but then it constrains it to find the unit with the matching ID.  I want it to find the relevant  power supply units and then go a particular Event ID# within the found set of power supply units.


      I hope this makes sense.  I have included the script below. (in case you were wondering, the DSE is the device that records the hours, although it is irrelevant to my current question).

      cumulative hours.png