I have a requirement to NOT allow a Maximo work order go to Complete or Close status under certain condtions.
I seem to be able to get a condition to work with 1 variable or qualifier such as PROBLEMCODE is not null, but when I start adding qualifiers things start to break down and not work.
Example that doesn't work in all situaitons - PROBLEMCODE is not null and geaforasset = 1 and wotype not in ('PM','FM') things don't work.
One suggestion from others is to move the expressions around such as geaforasset = 1 and wotype not in ('PM','FM') and PROBLEMCODE is not null. So I'm starting to try this.
I posted a PMR on this issue and was told to try taking the colon : off and not using that.
It was also suggested to use more parenthesis ( ) to group conditions and I'm trying that but haven't found the right combination yet.
Anyone had success with multiple expressions within 1 condition and what has and hasn't worked?
Pinned topic Multiple qualifiers in a conditional expression in Maximo Condition
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-20T10:31:03Z at 2013-02-20T10:31:03Z by maxmix
maxmix 2700038K0W83 Posts
Re: Multiple qualifiers in a conditional expression in Maximo Condition2013-02-15T15:36:30ZThis is the accepted answer. This is the accepted answer.hm your example has no colons so I do not see where you had them prior to removing them ;)
The colons are very important, as they are the only proper way of referencing an attribute in reference to the MBO your condition is applied to.
so in case the condition is applied to your workorder, all fields you want to reference within that workorder need to be prefixed with a colon.
Example of a ficticious usecase where to use and not use colons...
" :wotype is not in ('PM','FM') and :reportedby is not in (select userid from users where status='INACTIVE')"
SystemAdmin 110000D4XK5842 Posts
Re: Multiple qualifiers in a conditional expression in Maximo Condition2013-02-15T16:30:41ZThis is the accepted answer. This is the accepted answer.
- maxmix 2700038K0W
maxmix 2700038K0W83 Posts
Re: Multiple qualifiers in a conditional expression in Maximo Condition2013-02-20T10:31:03ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
> ((:GEAFORASSET = 1) and (:WORKTYPE in ('CM')) and (:PROBLEMCODE is not null))
misses a starting parenthesis.
Other than that, please start with only
:WORKTYPE in ('CM')
if this yields the proper result to start with, then increment your condition piece by piece to see when the scale tips. As I trust the standard fields first, I'd add "GEAFORASSET" only at last.
Is this field a peristent one, does it have field class attached and what type is it btw?