Maximo Open Forum

  • 1.  Creating a condition on not being able to change the status of a Work Order to completed if there are records in" Planning" application but not in "Actuals" application.

    Posted 10-10-2024 07:58

    Hello,

    Currently the user adds materials in the Planning section in Work Orders, but forgets to add the materials in Actuals section and he later changes the status to completed.

    In order to avoid this, is there an option for creating a condition for the user to not being able to change the status of a Work Order to completed, if there are records in "Planning" application but not in "Actuals" application and how. Without the need of creating an Automation Script.

    Maybe to create a new condition in conditional expression manager and link that condition to the "Completed" status in the domain.

    As per my checks, the table responsible to find if there are records in Plans tab is "WPITEM" and table responsible for actuals tab is 'MATUSETRANS' In short terms if one of the tables (WPITEM or MATUSETRANS) has records for a work order , the other table should also have records for that wonum respectively So if the user has added materials in Plan section they should add materials also in Actual section and vise verca or neither of them. I created the following query, but it does not work: ( (EXISTS ( SELECT 1 FROM WPITEM WHERE wonum = :wonum ) AND NOT EXISTS ( SELECT 1 FROM MATUSETRANS WHERE refwo = :wonum )) OR (EXISTS ( SELECT 1 FROM MATUSETRANS WHERE refwo = :wonum ) AND NOT EXISTS ( SELECT 1 FROM WPITEM WHERE wonum = :wonum )) )

    Thank you,


    #EverythingMaximo
    #MaximoApplicationSuite
    #MaximoUserGroups
    #WorkManagement

    ------------------------------
    Mateo Bako
    Infosoft Business Solutions
    ------------------------------


  • 2.  RE: Creating a condition on not being able to change the status of a Work Order to completed if there are records in" Planning" application but not in "Actuals" application.

    Posted 10-10-2024 11:25

    Hi @Mateo Bako!

    It is not a mistake to record or not record materials after COMPLETING the WO.

    A valid scenario is that the work is done, it is COMPLETED, and then the consumption is recorded in "Actuals". This is very common because otherwise the management becomes bureaucratic and it is not a good practice, in many situations where the most important thing is to be expeditious. Therefore, it is normal and valid to COMPLETE the work impacting the management indicators and then record the consumption.

    Now, I say COMPLETE and not CLOSE. Right? It is different.

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 3.  RE: Creating a condition on not being able to change the status of a Work Order to completed if there are records in" Planning" application but not in "Actuals" application.

    Posted 10-11-2024 09:52

    A few thoughts:

    • I think, basically, your code is good except it needs a NOT in front of it.  It looks to me like the code is currently saying, "allow me to change the status to COMP if there is data in one of the tables but not in the other" -- which is the exact opposite of what you're trying to achieve.
    • I would also "nitpick" a bit here, in that, even if you have a single-site implementation of Maximo, it's good practice (if not also possibly more efficient by leveraging an index) to include the SITEID in these queries.
    • I recommend that, within the WOSTATUS domain, when you modify the conditions for the COMP status, you both apply this code to the WORKORDER object and a second condition on the WOCHANGESTATUS object.  That is, if you're using the Change Status icon & dialog box, if you only make a Condition that affects the WORKORDER object, the user could still choose COMP from the dropdown but get an error when they click OK.  Putting on a 2nd condition that would apply (basically) the same Condition to the WOCHANGESTATUS object would prevent COMP from being a choice in the dropdown.
    • Of course this is your decision and subject to your organization's practices and procedures, but it seems at least extra-time-consuming to require every Work Order to have something in the Planned Materials before it can be Completed. Surely there would be an occasion where it's an emergency and there isn't proper time to plan.

    Anyways, to proceed as you stated, I'd put in two Conditions on COMP in the WOSTATUS domain:

    NOT ((EXISTS (SELECT 1 FROM WPITEM WHERE wonum = :wonum AND siteid = :siteid) AND NOT EXISTS ( SELECT 1 FROM MATUSETRANS WHERE refwo = :wonum AND siteid  = :siteid )) OR (EXISTS (SELECT 1 FROM MATUSETRANS WHERE refwo = :wonum AND siteid  = :siteid) AND NOT EXISTS ( SELECT 1 FROM WPITEM WHERE wonum = :wonum AND siteid  = :siteid)))

    The same code works for both objects in this case.



    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 4.  RE: Creating a condition on not being able to change the status of a Work Order to completed if there are records in" Planning" application but not in "Actuals" application.

    Posted 10-11-2024 11:17
    Matea, one more thing. Planning materials does not mean that they must be consumed.
     
    Perhaps in certain jobs it is correct (planned maintenance by use or time), but many times, there are companies that analyze the conditions and decide to extend the use, that is also valid and although the material is within the planning, it does not mean that it must be consumed. Also, if this is the case, the PLANNED vs. REAL comparison would always be identical and the idea is not to be able to compare them to see reality vs. what was planned in order to try to adjust (or the planning, or the execution or both).
    Regards!


    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 5.  RE: Creating a condition on not being able to change the status of a Work Order to completed if there are records in" Planning" application but not in "Actuals" application.

    Posted 10-14-2024 08:46

    Hi,

    From my testing, i created the following query based on the clients needs and added it to WOSTATUS - domain - completed status 

    So in this case the only thing the users cannot do is , they cannot complete the work order only if there are Materials added in Plan section, but not in Actual section

    (
        (EXISTS (
            SELECT 1
            FROM WPITEM
            WHERE wonum = :wonum
        ) AND EXISTS (
            SELECT 1
            FROM MATUSETRANS
            WHERE refwo = :wonum
        ))
        OR
        (NOT EXISTS (
            SELECT 1
            FROM WPITEM
            WHERE wonum = :wonum
        ) AND NOT EXISTS (
            SELECT 1
            FROM MATUSETRANS
            WHERE refwo = :wonum
        ))
        OR
        (EXISTS (
            SELECT 1
            FROM MATUSETRANS
            WHERE refwo = :wonum
        ) AND NOT EXISTS (
            SELECT 1
            FROM WPITEM
            WHERE wonum = :wonum
        ))
    )

    Thank you



    ------------------------------
    Mateo Bako
    Infosoft Business Solutions
    ------------------------------