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
------------------------------
Original Message:
Sent: 10-11-2024 11:17
From: Martin Fabra
Subject: 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.
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
Original Message:
Sent: 10-10-2024 06:19
From: Mateo Bako
Subject: 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.
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
------------------------------