If you decide to do this through Conditional Expression Manager, you might have to create conditions for TWO objects: WOSTATUS and WOCHANGESTATUS (it's what I had to do anyway). And because of the Attribute names in those tables, you may have to use a different Condition. For example, in mine, I have restrictions on INPRG. One condition starts with :status and the other (on the WOCHANGESTATUS object) starts with :wostatus
Making the Condition for WOCHANGESTATUS controls what is shown in the Change Status dialog. The Condition for WOSTATUS changes what the WORKORDER itself can accept.
Then you need to apply BOTH conditions to your status in the Domains application, WOSTATUS domain.
Original Message:
Sent: Sun September 08, 2024 11:45 PM
From: Pankaj Bhide
Subject: Work order Change status - restrict the value using conditional expression
Thanks Suren for all your help. I will let you know about it shortly.
Original Message:
Sent: 9/8/2024 10:59:00 PM
From: Surender Balasundaram
Subject: RE: Work order Change status - restrict the value using conditional expression
Hi Pankaj,
Yes. evalresult is implicit variable.
https://www.youtube.com/watch?v=UwLafkBNG0k
Please refer this link on how to create an condition of type class using automation script.
https://expertinmaximo.wordpress.com/2016/08/26/automation-script-for-conditional-expressions/?blogsub=subscribed#blog_subscription-4
Thanks,
Suren
------------------------------
Surender Balasundaram
Original Message:
Sent: Sun September 08, 2024 10:16 PM
From: Pankaj Bhide
Subject: Work order Change status - restrict the value using conditional expression
Hello
Thanks for your help.
I created the automation script. The "evalresult" seems to be an implicit variable. Correct?
How do I associate the automation script to the condition?
For the condition - there are only 2 types, EXPRESSION and JAVA CLASS. Shall I put the name of the automation script in the EXPRESSION field? Shall I leave "always evaluate" disabled?
Please let me know at your convenience
Thanks again
Pankaj Bhide
Original Message:
Sent: 9/8/2024 8:48:00 PM
From: Surender Balasundaram
Subject: RE: Work order Change status - restrict the value using conditional expression
Hi Pankaj, Please create a custom condition using automation script and attach it to WOSTATUS - AUTH_WAPPR values.
Reference link - CustomConditionlink
sample scripts:
if app == 'CUSTOM_WO':
evalresult=true
appName = mbo.getThisMboSet().getParentApp()
if appName == 'CUSTOM_WO':
evalresult=true
Please let me know if this option works.
Thanks,
Suren
------------------------------
Surender Balasundaram
Original Message:
Sent: Thu September 05, 2024 06:26 AM
From: Pankaj Bhide
Subject: Work order Change status - restrict the value using conditional expression
Hello,
We have 3 custom work order tracking applications (clones of WOTRACK) and we want to restrict the work order status based upon the app and also with some specific conditions.
For example, to start with the simple one - we have a custom work order tracking app titled "LBL_WO" and there is a work order status titled "AUTH_WAPPR" (waiting authorizer approval) which should visible only in "LBL_WO" custom app when user invoke "Chang WO Status" dialog box.
I created following conditional expression in MAS 9:
object name=SYNONYMNDOMAIN
( (len(trim(:&APPNAME&)=0) or (:&APPNAME&='LBL_WO') ) -- the first one before "or" is for allowing to change the status via Restful API
Now, I associated the above conditional expression to the WOSTATUS - AUTH_WAPPR domain row and saved the contents.
However, this work order status is still visible in the out of box work order tracking (it should not be visible in other app except LBL_WO as both the conditions yield false).
Any clue what wrong I am doing? Does it need to bounce the app servers?
------------------------------
Pankaj Bhide
------------------------------