Pankaj,
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.
------------------------------
Travis Herron
------------------------------
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