SlideShare ist ein Scribd-Unternehmen logo
1 von 3
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)

Weitere ähnliche Inhalte

Ähnlich wie 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ülZoltán Dávid
 
Fcontratos
FcontratosFcontratos
Fcontratoskarlloss
 
Rounded Shaped Box Example 1
Rounded Shaped Box Example 1Rounded Shaped Box Example 1
Rounded Shaped Box Example 1Sibananda Panda
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular UJoonas Lehtinen
 
Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400Default bmimcv2e1993st 1bsp2400
Default bmimcv2e1993st 1bsp2400GODIVA4000MESSERI
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and ImprovedTimothy Fisher
 
Responsive Email Design and Development
Responsive Email Design and DevelopmentResponsive Email Design and Development
Responsive Email Design and Developmentladyheatherly
 
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 ClickbankJaroslaw 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 SemanticsAdrian Roselli
 
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 clickbankJaroslaw 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 

Kürzlich hochgeladen (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

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)