Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Formula for total WO cost including tasks

    Posted Tue September 14, 2021 03:13 AM
    Edited by System Admin Wed March 22, 2023 11:52 AM
    MAM 7.6.1.2:

    Using an attribute formula:

    Is there a way to calculate the total WO cost including tasks?





    There are some related comments in this post.
    And another related post here: SQL Window Functions: Rollup WO costs (including tasks)



    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Formula for total WO cost including tasks

    Posted Tue September 14, 2021 03:34 AM
    Edited by System Admin Wed March 22, 2023 11:44 AM

    Formulas:

    1. WO costs (doesn't include tasks or child WOs): acttotalcost

    2. Total WO cost (includes tasks; doesn't include child WOs): acttotalcost + sum$wo_tasks$acttotalcost

    3. Work package cost; aka grand total (includes tasks and child WOs): sum$workpack$acttotalcost


    Notes:

    acttotalcost is a non-persistent field in WORKORDER.

    wo_tasks and workpack are OOB WORKORDER relationships that point back to the same table (WORKORDER).



    On a side note:

    If the formula was only being used to check for the presence of actuals, then I wonder if a conditional expression could be used. Put logic in a condition to check for actuals, and then use that condition in the formula.
    More info here: 
    Formulas: Conditions can be any valid condition that Maximo allows, including SQL


    #AssetandFacilitiesManagement
    #Maximo


  • 3.  RE: Formula for total WO cost including tasks

    Posted Wed September 15, 2021 04:40 PM
    Hi,

    You may be better off just accessing the non-persistent MBOs WOTotalSet (work order and tasks) and WOGrandTotalSet (package).  You can see the results when looking at the View Costs dialog in WOTrack.

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 4.  RE: Formula for total WO cost including tasks

    Posted Wed September 15, 2021 10:39 PM
    Edited by System Admin Wed March 22, 2023 11:44 AM
    Hi Steve,

    Are you referring to the psdi.app.workorder.virtual.WOTotalSet Java class?
    How would I use WOTotalSet to populate WORKORDER fields?

    Thanks!





    #AssetandFacilitiesManagement
    #Maximo


  • 5.  RE: Formula for total WO cost including tasks

    Posted Fri September 17, 2021 02:06 PM
    Hi, yes, that is one of the two sets.  I guess the question is why would you populate WO and not just display the values via relationship to this other set?  Be careful of continually updating persistent WO fields every time a child, grandchild, great-grandchild, etc changes as this will become a performance issue and/or your users are going to start getting the dreaded record changed by another user message on a potentially regular basis.  If you can supply a bit more info then perhaps I can give further assistance.

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 6.  RE: Formula for total WO cost including tasks

    Posted Fri September 17, 2021 10:57 PM
    Thanks Steve.

    This is one of the problems I'm trying to solve:

    Query for actuals via WO Advanced Search

    Possibly with a non-persistent field and an attribute formula.