SlideShare a Scribd company logo
from java.lang import StringBuilder
from psdi.mbo import MboConstants
from psdi.util import HTML
val = StringBuilder()
# retrieve attributes and writes them in HTML format in the buffer
#Work Order header row
val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>"
+ "<thead>"
+ "<tr>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "WO Number" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "SITE" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "STATUS" + "</b>" + "</font>" + "</td>"
+ "</thead>"
+ "</table>")
val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>"
+ "<tr>"
+ "<td width=10%><font size=-2>" + mbo.getString("WONUM") +
"</font></td>"
+ "<td width=10%><font size=-2>" + mbo.getString("SITEID") +
"</font></td>"
+ "<td width=10%><font size=-2>" + mbo.getString("STATUS") +
"</font></td>"
+ "</font></td>"
+ "</tr>"
+ "</table>")
val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>"
+ "<thead>"
+ "<tr>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Location" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Owner" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Status Date" + "</b>" + "</font>" + "</td>"
+ "</thead>"
+ "</table>")
val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>"
+ "<tr>"
+ "<td width=10%><font size=-2>" + mbo.getString("LOCATION") +
"</font></td>"
+ "<td width=10%><font size=-2>" + mbo.getString("OWNER") +
"</font></td>"
+ "<td width=10%><font size=-2>" + mbo.getString("STATUSDATE") +
"</font></td>"
+ "</font></td>"
+ "</tr>"
+ "</table>")
val.append("<hr>")
val.append("<font size=-2><b>DESCRIPTION</b></font><br>")
val.append(mbo.getString("DESCRIPTION") + "<br>")
val.append("<hr>")
##------------------------------------------------------------------------------
----
val.append("<font size=-2><b>RELATED RECORDS</b></font><br>")
# retrieve Related Records records and writes them in the buffer
relatedrecSet = mbo.getMboSet("RELATEDWO")
#related records header row
val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>" + "<col width=70%>"
+ "<thead>"
+ "<tr>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Class" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Recordkey" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Status" + "</b>" + "</font>" + "</td>"
+ "<td width=70%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Summary" + "</b>" + "</font>" + "</td>"
+ "</thead>"
+ "</table>")
currMbo=relatedrecSet.moveFirst()
while currMbo is not None:
val.append("<table border=0 width=1000>" + "<col width=10%>" +
"<col width=10%>" + "<col width=10%>" + "<col width=70%>"
+ "<tr>"
+ "<td width=10%><font size=-2>" +
relatedrecSet.getString("RELATEDRECWOCLASS") + "</font></td>"
+ "<td width=10%><font size=-2>" +
relatedrecSet.getString("RELATEDRECWONUM") + "</font></td>"
+ "<td width=10%><font size=-2>" +
relatedrecSet.getString("RELATEDRECWO.STATUS") + "</font></td>"
+ "<td width=70%><font size=-2>" +
relatedrecSet.getString("RELATEDRECWO.DESCRIPTION") + "</font></td>"
+ "</font></td>"
+ "</tr>"
+ "</table>")
currMbo=relatedrecSet.moveNext()
#retrieve work log records and writes them in the buffer
worklogSet = mbo.getMboSet("MODIFYWORKLOG")
worklogSet.setOrderBy("CREATEDATE")
val.append("<hr>")
val.append("<font size=-2><b>WORK LOG</b></font><br>")
# LOG records header row
#
# Changed the call from currmbo.getString for the longdescription to
HTML.toPlainText
# This is due to a problem with invalid HTML in the logs corrupting the
script and causing it to stop
#
val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>"
+ "<col width=10%>" + "<col width=70%>"
+ "<thead>"
+ "<tr>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Date Created" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Created By" + "</b>" + "</font>" + "</td>"
+ "<td width=10%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Log Type" + "</b>" + "</font>" + "</td>"
+ "<td width=70%>" + "<font color=#000000 size=-2>"
+ "<b>" + "Summary" + "</b>" + "</font>" + "</td>"
+ "</thead>"
+ "</table>")
currMbo=worklogSet.moveFirst()
while currMbo is not None:
val.append("<table border=0 width=1000>" + "<col width=10%>" +
"<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=70%>"
+ "<tr>"
+ "<td width=10%><font size=-2>" +
worklogSet.getString("CREATEDATE") + "</font></td>"
+ "<td width=10%><font size=-2>" + worklogSet.getString("CREATEBY")
+ "</font></td>"
+ "<td width=10%><font size=-2>" + worklogSet.getString("LOGTYPE")
+ "</font></td>"
+ "<td width=70%><font size=-2>" +
worklogSet.getString("DESCRIPTION") + "</font></td>"
+ "</font></td>"
+ "</tr>"
+ "<tr bgcolor=#C0C0C0>"
+ "<td COLSPAN=4 ><font size=-2>" +
HTML.toPlainText(currMbo.getString("DESCRIPTION_LONGDESCRIPTION")) +
"</font></td>"
+ "</tr>"
+ "</table>")
currMbo=worklogSet.moveNext()
# sets the formatted string in the attributes value
mbo.getMboValue("BPDSUMMARY").setValue(val.toString(),
MboConstants.NOACCESSCHECK | MboConstants.NOVALIDATION)

More Related Content

Similar to Automation Script for WO Summary in Maximo

A HTML5 platform demókon keresztül
A HTML5 platform demókon keresztülA HTML5 platform demókon keresztül
A HTML5 platform demókon keresztül
Zoltán Dávid
 
Fcontratos
FcontratosFcontratos
Fcontratos
karlloss
 
Rounded Shaped Box Example 1
Rounded Shaped Box Example 1Rounded Shaped Box Example 1
Rounded Shaped Box Example 1
Sibananda Panda
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
Yaowaluck Promdee
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
Joonas Lehtinen
 
Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400
GODIVA4000MESSERI
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
Timothy Fisher
 
Responsive Email Design and Development
Responsive Email Design and DevelopmentResponsive Email Design and Development
Responsive Email Design and Development
ladyheatherly
 
Html and css
Html and cssHtml and css
Earn money with banner and text ads for Clickbank
Earn money with banner and text ads for ClickbankEarn money with banner and text ads for Clickbank
Earn money with banner and text ads for Clickbank
Jaroslaw Istok
 
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
Adrian Roselli
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
Sena Cedagro
 
Earn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbankEarn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbank
Jaroslaw Istok
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichRobert Nyman
 

Similar to Automation Script for WO Summary in Maximo (20)

HTML5
HTML5HTML5
HTML5
 
A HTML5 platform demókon keresztül
A HTML5 platform demókon keresztülA HTML5 platform demókon keresztül
A HTML5 platform demókon keresztül
 
Fcontratos
FcontratosFcontratos
Fcontratos
 
Rounded Shaped Box Example 1
Rounded Shaped Box Example 1Rounded Shaped Box Example 1
Rounded Shaped Box Example 1
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Md5 decrypter
Md5 decrypterMd5 decrypter
Md5 decrypter
 
Responsive Email Design and Development
Responsive Email Design and DevelopmentResponsive Email Design and Development
Responsive Email Design and Development
 
Html and css
Html and cssHtml and css
Html and css
 
1cst
1cst1cst
1cst
 
shoubox script
shoubox scriptshoubox script
shoubox script
 
Earn money with banner and text ads for Clickbank
Earn money with banner and text ads for ClickbankEarn money with banner and text ads for Clickbank
Earn money with banner and text ads for Clickbank
 
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
 
Earn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbankEarn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbank
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
 
incoming
incomingincoming
incoming
 
Theme
ThemeTheme
Theme
 

Recently uploaded

Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 

Recently uploaded (20)

Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 

Automation Script for WO Summary in Maximo

  • 1. from java.lang import StringBuilder from psdi.mbo import MboConstants from psdi.util import HTML val = StringBuilder() # retrieve attributes and writes them in HTML format in the buffer #Work Order header row val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<thead>" + "<tr>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "WO Number" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "SITE" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "STATUS" + "</b>" + "</font>" + "</td>" + "</thead>" + "</table>") val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<tr>" + "<td width=10%><font size=-2>" + mbo.getString("WONUM") + "</font></td>" + "<td width=10%><font size=-2>" + mbo.getString("SITEID") + "</font></td>" + "<td width=10%><font size=-2>" + mbo.getString("STATUS") + "</font></td>" + "</font></td>" + "</tr>" + "</table>") val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<thead>" + "<tr>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Location" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Owner" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Status Date" + "</b>" + "</font>" + "</td>" + "</thead>" + "</table>") val.append("<table border=0 width=500>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<tr>" + "<td width=10%><font size=-2>" + mbo.getString("LOCATION") + "</font></td>" + "<td width=10%><font size=-2>" + mbo.getString("OWNER") + "</font></td>" + "<td width=10%><font size=-2>" + mbo.getString("STATUSDATE") + "</font></td>" + "</font></td>" + "</tr>" + "</table>") val.append("<hr>") val.append("<font size=-2><b>DESCRIPTION</b></font><br>")
  • 2. val.append(mbo.getString("DESCRIPTION") + "<br>") val.append("<hr>") ##------------------------------------------------------------------------------ ---- val.append("<font size=-2><b>RELATED RECORDS</b></font><br>") # retrieve Related Records records and writes them in the buffer relatedrecSet = mbo.getMboSet("RELATEDWO") #related records header row val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=70%>" + "<thead>" + "<tr>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Class" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Recordkey" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Status" + "</b>" + "</font>" + "</td>" + "<td width=70%>" + "<font color=#000000 size=-2>" + "<b>" + "Summary" + "</b>" + "</font>" + "</td>" + "</thead>" + "</table>") currMbo=relatedrecSet.moveFirst() while currMbo is not None: val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=70%>" + "<tr>" + "<td width=10%><font size=-2>" + relatedrecSet.getString("RELATEDRECWOCLASS") + "</font></td>" + "<td width=10%><font size=-2>" + relatedrecSet.getString("RELATEDRECWONUM") + "</font></td>" + "<td width=10%><font size=-2>" + relatedrecSet.getString("RELATEDRECWO.STATUS") + "</font></td>" + "<td width=70%><font size=-2>" + relatedrecSet.getString("RELATEDRECWO.DESCRIPTION") + "</font></td>" + "</font></td>" + "</tr>" + "</table>") currMbo=relatedrecSet.moveNext() #retrieve work log records and writes them in the buffer worklogSet = mbo.getMboSet("MODIFYWORKLOG") worklogSet.setOrderBy("CREATEDATE") val.append("<hr>") val.append("<font size=-2><b>WORK LOG</b></font><br>") # LOG records header row # # Changed the call from currmbo.getString for the longdescription to HTML.toPlainText # This is due to a problem with invalid HTML in the logs corrupting the script and causing it to stop # val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=70%>" + "<thead>" + "<tr>"
  • 3. + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Date Created" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Created By" + "</b>" + "</font>" + "</td>" + "<td width=10%>" + "<font color=#000000 size=-2>" + "<b>" + "Log Type" + "</b>" + "</font>" + "</td>" + "<td width=70%>" + "<font color=#000000 size=-2>" + "<b>" + "Summary" + "</b>" + "</font>" + "</td>" + "</thead>" + "</table>") currMbo=worklogSet.moveFirst() while currMbo is not None: val.append("<table border=0 width=1000>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=10%>" + "<col width=70%>" + "<tr>" + "<td width=10%><font size=-2>" + worklogSet.getString("CREATEDATE") + "</font></td>" + "<td width=10%><font size=-2>" + worklogSet.getString("CREATEBY") + "</font></td>" + "<td width=10%><font size=-2>" + worklogSet.getString("LOGTYPE") + "</font></td>" + "<td width=70%><font size=-2>" + worklogSet.getString("DESCRIPTION") + "</font></td>" + "</font></td>" + "</tr>" + "<tr bgcolor=#C0C0C0>" + "<td COLSPAN=4 ><font size=-2>" + HTML.toPlainText(currMbo.getString("DESCRIPTION_LONGDESCRIPTION")) + "</font></td>" + "</tr>" + "</table>") currMbo=worklogSet.moveNext() # sets the formatted string in the attributes value mbo.getMboValue("BPDSUMMARY").setValue(val.toString(), MboConstants.NOACCESSCHECK | MboConstants.NOVALIDATION)