Question & Answer
Question
How do I handle a SR Long Description so that spacing appears in the RTE?
Answer
Scripting with Maximo References:
https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/scripting_with_maximo6?lang=en
https://www.ibm.com/developerworks/community/forums/ajax/download/77777777-0000-0000-0000-000014772567/b8ec7d85-6a8d-4e25-bb89-d729c3322406/attachment_14772567_Scripting_with_Maximo.pdf
Steps how to accomplish this as follows:
1)System Configuration > Platform Configuration > Automation Scripts
2)Action > Create a Script with an Attribute Launch Point
3)Automation Script Tab
4)Script Source (Note that python is sensitive to indentation)
from psdi.util import HTML
if not interactive:
if not (LD.startswith('<html>')):
LD = HTML.cleanText(LD)
LD = LD + HTML.RICH_TEXT_MARKER
5) Variables Tab as follows:
6)Launch Point Tab as follows:
7)Attribute Launch Point Details as follows:
8)To implement, change the script status from Inactive to Active.
Examples:
A) Without script activated:
Logging at point LDTEXT db field is written:
07 Nov 2014 08:03:42:083 [INFO] [MXServer] [CID-CRON-252] BMXAA6721I - Bind value for LDTEXT = by John Donne
No man is an island,
Entire of itself.
Each is a piece of the continent,
A part of the main.
If a clod be washed away by the sea,
Europe is the less.
As well as if a promontory were.
As well as if a manner of thine own
Or of thine friend's were.
Each man's death diminishes me,
For I am involved in mankind.
Therefore, send not to know
For whom the bell tolls,
It tolls for thee.
SR Details:
B)With script activated:
Logging at point LDTEXT db field is written:
07 Nov 2013 08:08:56:301 [INFO] [MXServer] [CID-CRON-297] BMXAA6721I - Bind value for LDTEXT = by John Donne
No man is an island,
Entire of itself.
Each is a piece of the continent,
A part of the main.
If a clod be washed away by the sea,
Europe is the less.
As well as if a promontory were.
As well as if a manner of thine own
Or of thine friend's were.
Each man's death diminishes me,
For I am involved in mankind.
Therefore, send not to know
For whom the bell tolls,
It tolls for thee.
SR Details:
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21689576