Pages

October 16, 2013

Display a summary of an object

NOTE: This techniques requires Java programming. A similar article describes how to achieve the same results with scripting.

One of the customer that I'm working with is heavily relying on work logs. Unfortunately, the work logs are displayed in a standard table so there is no way of quickly displaying all the logs entered by the users.

The solution I have designed is a Summary tab in the Work Order Tracking application that displays the main attributes of the selected work order together with the historical work logs in one single text box.

The described solution relies on the Rich Text editor control available in TPAE 7.5 but can be easily adapted to a standard multiline text box available in previous version of Maximo.
Here are the configuration steps.

Database Configuration

The first step is to define a virtual (non persistent) attribute that will be used to display the work order summary text.

Open WORKORDER object in Database Configuration and add the following attribute.

Attribute: WOSUMMARY

Title: Summary

Type: CLOB

Class: mxdev.app.wo.FldWoSummary

Persistent: false

Save and apply database changes.

Application Designer

The second step is to add a new tab to the WOTRACK application that contains just a large texbox that will display the attribute defined above.

Open WOTRACK application in Application Designer and export application XML. Open the wotrack.xml file with a text editor and add the following lines just before the </tabgroup></clientarea> tags.
Here is how the file should look like (the text in bold is what needs to be added).

The last configuration steps is to write the Java class that has been attached to the WORKORDER.WOSUMMARY field. This piece of code will retrieve all the necessary information from the work order and build an HTML string that will be assigned to the field string value.

Open your development environment and create a mxdev.app.wo.FldWoSummary class like this.

Follow MaximoDev on

Follow by Email

Google+ Followers

Disclaimer

The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
The materials on this site are provided "AS IS" and the author will not be liable for any direct, indirect or incidental damages arising out or relating to any use or distribution of them.