How to show an error message by automation script?

September 20, 2017 Cynthia Wang

In Maximo application, you may want to validate some attributes before save the record. If the attributes are incorrect, you would like the system to gave error message to indicate the users to fix the data before saving the record. There are many ways to achieve this function in Maximo, while today I would like to give an example by using automation script.


For example, we have a use case like this:

In Work Order Tracking application, ESTDUE is set as "0:00" by default, while we prefer user input correct value before save the record.


And how to achieve this function? You may try this way:

Step 1: Create new warning message
In System Configuration - Platform Configuration - Database Configuration, Click More Action - Messages
Click New to create a new message:
Message Group: mygroup
Message Key:mykey1
Display Method: MSGBOX
Message ID Prefix:BMXZZ
Message ID Suffix:E
Value:Please correct value of ESTDUE
Display ID: Tick it
Buttons: Tick OK
















# Please note, you may add warning message here.

If it is a warning message, the system would not stop the user saving the record.


Step 2:

Step 2: Create automation script
1. Create a new Script with Object Launch Point
-Launch Point name: ESTDUR
- Event: Save
- Save: Tick Add, Update and Before Save













2. Next step
- Script: ESTDUR
- Script Language: python
- New Variable:
Variable: ESTDUR
Variable Type: INOUT
Binding Type: Attribute
Launch Point Attribute: ESTDUR













3. Next Step:
due = mbo.getMboValue("ESTDUR").getString()

if (due == '0:00'):
   errorgroup = "mygroup"
   errorkey = "mykey1"












# If you are using warning message, the code for warning message will be:

  warngroup = "mygroup"
  warnkey = "mykey1"

Please refer this blog for details:

HOWTO: Throwing a Warning Dialog in an Automation Script




Now, please go to work order tracking application and create a new work order. When save it, error message would occur if ESTDUE is "0:00".



Previous Article
From the Maximo Support Desk - Cannot View Work Log Entries In Internet Explorer 10 and 11
From the Maximo Support Desk - Cannot View Work Log Entries In Internet Explorer 10 and 11

UPDATE...  the issue described in this article was resolved with an APAR and subsequent Feature Pack releas...

Next Article
Webcast Oct 3rd: Maximo Performance Tuning and Troubleshooting – Part 2

  Join us for this one hour webcast that will cover the Maximo infrastructure and troubleshooting performan...


Want our latest news? Subscribe to our blog!

Last Name
First Name
Thank you!
Error - something went wrong!