Skip to main content

Digital Experience

Climbing Out of the Maximo Developer’s Rabbit Hole

Years ago on a large project to implement Maximo SmartCloud Control Desk [SCCD], now IBM Control Desk [ICD], we all had our own instances for developing that we could refresh at any time. Even the architect team had their own instance. One of their team members tinkered around quite a bit. Since we became friends she was more comfortable asking questions about what she was trying to do in Maximo or why it wasn’t working. Be it email, IM or just coming [sometimes running] down the hallway the answer was usually the same:

Did you turn your Admin Mode off?

It wasn’t always the issue but enough that we would laugh about it. Just one of those things that always stumped her. It happens to all of us. You think it’s just this one little configuration or auto script but it doesn’t work. Next thing you know you are down a rabbit hole and you don’t know how you got there.

About a year ago a client asked to require either the Work Order Number or the Storeroom on a PR Line to save the Purchase Requisition. I thought, I could use an auto script and it would be easy peasy, until I sat down to create it.

If wonum is None then storeroom is required?

That won’t work! It became a big Auto script that didn’t work and it had to be backed out. There are a million ways to do everything in Maximo and you just need to find that one good way to make it happen.

Recently, a similar scenario came up. The client wants to require a Location or an Asset in Work Order Tracking.

Oh man! This again?

Thankfully, it didn’t take too long before I pulled my head out of the rabbit hole it was descending into and realized it wasn’t about requiring at all. We just need to stop the user…


First decide what the error should say then create the error message in Database Configuration:

Go To Automation Scripts and Create Script with Object Launch Point.

Populate the Name, Description and Object for your launch point. The event will be ‘Validate Application’ because we will be validating the fields.

Next specify the variables after naming the script and defining the script language (jython was used in this example).

The variables are basic because all that is needed is asset, location and work order number. Once defined, click Next to write the source code.

We know that if the asset field is blank and the location field is blank we want the user to know they must enter data in one of them but don’t forget to tie that to the work order that is requiring the asset or the location. So we start with, if the work order number is populated and the location is blank and the asset is blank:

if wo is not None and loc is None and asset is None:

Don’t forget the colon at the end of the line.

Now to define the error to be thrown when the parameters are met, or rather not met. Remember creating the message in Database Configuration?

errorgroup = ‘CUSTOM’
       errorkey = ‘assetORloc’

Lastly, the work order number can be defined in the error. When creating the error message it could be created as “A Location or an Asset is required” or as “A Location or an Asset is required for {0}”. The {0} can be used to define the record you are in:

params = [wo]

Now, let’s put it altogether, don’t forget the indents under the IF statement.

if wo is not None and loc is None and Asset is None:
           errorgroup = ‘CUSTOM’
           errorkey = ‘assetORloc’
           params = [wo]

Click Create, which will also validate the auto script.

All there is left is to test in Work Order Tracking.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Kristen McKernon, Lead Technical Consultant

Providing simple solutions to make you IBM Maximo sweet.

More from this Author

Follow Us