Maximo

 View Only
  • 1.  Work Order Failure Reporting

    Posted Fri June 12, 2020 06:12 AM
    I'm looking to create a button in our Work order Quick reporting app to allow the user to select default values for the failure reporting when no faults are found. The vast majority of our work orders are signed off as no faults found and this would save a few clicks on each work order close out.

    I've been following the steps as laid out by MATTHIAS STROSKE on this website and have managed to add the button and sigoption etc. but I'm not experienced enough to work out the Automation script I need. I think I would need to add something like the following but i need help.


    mbo.setValue("FAILURECODE", "NO OBSERVED FAILURE MODE")

    mbo.setValue("PROBLEM", "Changed the description")

     

    mbo.setValue("FAILURECODE", "NO OBSERVED FAILURE CAUSE")

    mbo.setValue("CAUSE", "Changed the description")

     

    mbo.setValue("FAILURECODE", "TASKS COMPLETED - NO FAULT FOUND")

    mbo.setValue("REMEDY", "Changed the description")


    Any help would be much appreciated.


    Failure report


    ------------------------------
    Richard White
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Work Order Failure Reporting

    Posted Mon June 15, 2020 12:33 PM
    Richard, 

    This solution assumes that your action is associated with the WORKORDER object and not attached to the FAILUREREPORT table, since it requires that you set failure class.  If you wanted to tie it to the FAILUREREPORT and change defaults based on the selected failure class a switch statement would let you do that quite easily.

    // this requires that the action be in the context of the work order
    // where the WORKORDER object is the set to the provided mbo variable.
    failureReportSet = mbo.getMboSet("FAILUREREPORT")
    
    // delete any existing failure reports
    failureReportSet.deleteAll()
    
    // set the failure class on the work order (the actual attribute is failure code)
    mbo.setValue("FAILURECODE", "HARDWARE")
    
    // the first failure code is automatically mapped to the problem
    problem = failureReportSet.add()
    problem.setValue("FAILURECODE", "KEYSTICK")
    
    // the second failure code is automatically mapped to the cause
    cause = failureReportSet.add()
    cause.setValue("FAILURECODE", "WORNKEY")
    
    // the third failure code is automatically mapped to the remedy
    remedy = failureReportSet.add()
    remedy.setValue("FAILURECODE", "REPLKEY")


    ------------------------------
    Jason VenHuizen
    ------------------------------



  • 3.  RE: Work Order Failure Reporting

    Posted Wed June 17, 2020 02:09 AM
    Jason
    Thank you so much for your help.
    This works a treat.

    ------------------------------
    Richard White
    ------------------------------