Maximo Open Forum

 View Only

 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.

  • Everything Maximo
  • Maximo Application Suite
  • Work Management
Mateo Bako's profile image
Mateo Bako posted 10-09-2024 10:33

Hi,

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.

Thank you,

Niv Geo's profile image
Niv Geo

Condition: WOACTMAT - exists (select 1 from matusetrans where refwo=:wonum and issuetype='ISSUE')

Apply the condition to status COMP under WOSTATUS (Domains)

You can play with the query to check planned materials vs actuals; all planned materials are issued or just check if there are only issued items without comparing the quantity for the planned materials

Mateo Bako's profile image
Mateo Bako

Hi ,

I created the following conditional expression and assigned it to domain: WOSTAT, and completed status, but it still does not work:

The idea is for the system to check if there are records in PLAN--> Materials tab in work order and there are no records in ACTUAL--> Materials tab in that work order and VISE VERCA , then the system should not allow the work order to be changed to completed Status

( (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 )) )