Technical Blog Post
Abstract
Rich Text data showing in COMMLOG table and in Reports (Script Solution)
Body
When creating a communication from work order module or any other application, communication logs and email that was triggered are fine, but you may be noticing some rich text data when the record gets saved to the database (Commlog table).
You may also be noticing unwanted tags in the data in reports.
The Rich Text tags can be stripped from the field using an Object Launch point AutoScript.
1. Go to Automation Scripts app
2. Click Select Action and create a new Object Launch Point
3. The Object is COMMLOG
4. The events should be Add and Update.
5. Enter the variable as follow:
Variable -> MSG
Type -> INOUT
Binding Type -> Attribute
Binding Value -> MESSAGE
6. Add the following script
#-----------------------------------------------------------------------
from psdi.util import HTML
MSG = HTML.toPlainText(MSG)
#-----------------------------------------------------------------------
7. Save it and activate the automation script.
8. Send a new communication from Maximo and check the record in the database.
UID
ibm11112277