Today I faced an interesting problem. My customer asked to be able to search work orders with specific values in one of the custom fields I have added few weeks ago to the Work Order Tracking application. Easy I said. I know I just need to add that custom fields in the ‘searchmore’ dialog of the WOTRACK application. However, when I added the new custom field to the Advanced Search dialog the lookup was displaying an empty list.
After some investigation i have found that the domain assigned to the custom attribute has some bind variables in the List Where Clause.
The problem is caused by the fact that Maximo does not know how to bind the :classstructureid variable to display the lookup in the Advanced Search dialog.
An easy solution to this problem is the following Automation script triggered by the Retrieve List event on the custom attribute (SR.SUBSYSTEMID in this example).
Here is the code snippet.
# Display all values in the Advanced Search dialog
if mbo.isZombie():
listWhere="1=1"
very good solution.
Dear Bruno,
Thanks for your informative session.
I have a typical requirement of running the report on PO status change to ‘APPR’ through the workflow and I created an action and attached it to workflow node.But when I attach the automation scipt to the workflow node,the workflow gets hung on the last stage of the approval.Could you please give any clue to resolve the issue
Hi Bruno,
Could please throw some light on what is the isZombie() method
You made some good points there. I looked on the net for more information about the issue and found
most people will go along with your views on this web
site. and i working for thue may chu du lieu
You could do something like this for the list clause too
classstructureid = :classstructureid or :classstructureid is null
My particular case involved showing only records sharing the default insert site of the user on the list/advanced search screens…otherwise use the siteid itself to limit the list.
Valdiation where: location=:ex_defaulttruck and siteid=:siteid
List Where: type=’TRUCK’ and status=’OPERATING’ and (siteid = :siteid or (:siteid is null and siteid in (select DEFSITE from maximo.maxuser where MAXUSER.USERID = :&USERNAME&)))