Which dialog box is it? There are a couple of them one with the Manual Input Node and the other is a Complete Workflow Assignment.
Original Message:
Sent: Mon July 29, 2024 10:07 AM
From: Sarath T
Subject: WorkOrder Status Change Dialog
@Priyaranjandas Kolambkar Are you able to make memo mandatory while rejecting workorder in work flow ? I have tried some scripts on COMPLETEWF but its unsuccessful. Any thoughts ?
------------------------------
Sarath T
Maximo Consultant
ECCS Ltd
Bristol
Original Message:
Sent: Sun July 11, 2021 07:41 AM
From: Priyaranjandas Kolambkar
Subject: WorkOrder Status Change Dialog
Hi,
Extending this further, can we have the memo field mandatory on the Workflow input mode, depending on the option selected? For e.g. if the input node has an option to approve and reject a Work Order, if the user selects the option to reject the Work Order, can the memo field be made mandatory dynamically (to enforce the approver to provide a reason for rejection).
Note: This is the memo field on the workflow, not on the status table.
------------------------------
Priyaranjandas Kolambkar
Original Message:
Sent: Thu April 23, 2020 12:28 PM
From: Steven Shull
Subject: WorkOrder Status Change Dialog
You're pretty close, but the arguments are slightly different. The first argument is for the domainid (in this case, WOSTATUS out of the box), and the second should be your status value.
So your IF statement should look like this:
if MXServer.getMXServer().getMaximoDD().getTranslator().toInternalString("WOSTATUS", mbo.getString("STATUS"), mbo)=="CLOSE":
The other thing I would add, is if you aren't on WOCHANGESTATUS (but an actual stateful MBO like WO), there's a much easier way to get the value. Everything that extends statefulmbo (which is most objects that have a status) has a public method called getInternalStatus(). So if this was WO itself, you could just call mbo.getInternalStatus()
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
Original Message:
Sent: Thu April 23, 2020 11:17 AM
From: Jason Verly
Subject: WorkOrder Status Change Dialog
Thx for the inspiration Steve. I'm working on this, but want to look at making the requirement to apply to all synonym values and I don't have it quite right.
from psdi.mbo import MboConstantsfrom psdi.server import MXServerif MXServer.getMXServer().getMaximoDD().getTranslator().toInternalString("STATUS", mbo.getString("CLOSE"), mbo)=="CLOSE": mbo.getMboValue("MEMO").setRequired(True)
Any suggestions?
------------------------------
Jason Verly
Reliability Engineering Manager
Agropur US
Le Sueur MN
Original Message:
Sent: Tue April 21, 2020 08:32 AM
From: Steven Shull
Subject: WorkOrder Status Change Dialog
Any time you want to require something, I typically recommend things done at a MBO level (global data restriction typically) over application level restrictions. I imagine you want this to apply to all applications where someone could change the status for example. Most people think about WOTRACK, but QUICKREP is another option out of the box and someone may have cloned those apps or you may have industry solutions/add-ons with their own version and you probably want to require it in all of them, which global data restriction is good at handling. Not to mention that conditional UI is a pain (since you only want to require it when the status is CAN).
For this particular situation, you can't use a global data restriction due to an issue with how the framework validates the data restrictions (I think it's a bug, so I may open a PMR for it, but I noticed it in our 7.6.0.9 & 7.6.1.1 demo apps in trying to confirm it would work). So I would make it an attribute launch point automation script on WOCHANGESTATUS on the STATUS attribute. With a simple python script like below, it will be required. No screen changes and you can build out any logic you need should you require it for other status changes (for example, this looks for literal status='CAN', but you may have synonyms of that status)
if mbo.getString("STATUS")=="CAN":
mbo.getMboValue("MEMO").setRequired(True)
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
Original Message:
Sent: Mon April 20, 2020 05:19 AM
From: Richard White
Subject: WorkOrder Status Change Dialog
Does anybody know how to make changes to the Work Order Status change dialog.
I Would like to make the Memo field compulsory if the user wants to cancel a work order.
I've tried using Application designer but cannot find the dialog.
------------------------------
Richard White
------------------------------
#Maximo
#AssetandFacilitiesManagement