Add Work Log Functionality to other Maximo Objects

The Work Log is a great piece of functionality added to Maximo in version 6. It provides a chronological and historical view of notes captured against a Work Order or a Service Request. In previous versions, the record’s long description field was the only mechanism for capturing notes. Now, the Work Log allows for better organization of notes – specifically how notes were captured, displayed, and reported on. As versions of Maximo progressed over time, more applications began adopting Work Logs to organize notes. Work Logs are now present in Purchase Requisitions, Purchase Orders, and other record types. However, Work Logs are not present everywhere in Maximo… yet.

This article will describe how to configure Work Logs for other record types, so that they too can have the benefit of organized, chronological notes. In this example, we will add Work Logs to Location records in Maximo.

EDIT: This solution works for site-level parent objects, such as Locations. Organization-level parent objects, such as Companies, will throw an exception as they do not have a SITEID attribute in their table definition.

Step 1: Check Field Lengths

The WORKLOG table has a field called RECORDKEY that is used to store the key attribute information for the related record. In the case of Work Orders, the WONUM field is stored as the RECORDKEY. In the case of Service Requests, the TICKETID is stored as the RECORDKEY.

As we are configuring Work Logs for Locations, we need to store the LOCATION field as the RECORDKEY in the WORKLOG table. Before doing so, let’s make sure that the field length of the WORKLOG.RECORDKEY is at least as long as the LOCATIONS.LOCATION field, to prevent character length issues down the line.

  1. Log into Maximo as an administrative user
  2. Navigate to the System Configuration > Platform Configuration > Database Configuration application
  3. Locate the LOCATIONS object, then navigate to the Attributes tab
  4. Locate the LOCATION attribute, and note its field type and length
  5. Navigate back to the List View, locate the WORKLOG object, then navigate to the Attributes tab
  6. Locate the RECORDKEY attribute, and note its field type and length
  7. Update the Length attribute to be at least as long as the length of the LOCATIONS.LOCATION field, if necessary
  8. Save the record and perform the Database Configuration steps, if necessary

Step 2: Add New Relationship

We will need to relate the LOCATIONS table to the WORKLOG table via a relationship in Maximo. This relationship will be used as part of the subsequent configuration to display Work Log entries that are related to a given Location.

  1. Log into Maximo as an administrative user
  2. Navigate to the System Configuration > Platform Configuration > Database Configuration application
  3. Locate the LOCATIONS object, then navigate to the Relationships tab
  4. Click the New Row button:
    1. Name: WORKLOG
    2. Child: WORKLOG
    3. Where Clause: recordkey=:location and class=’LOCATION’ and siteid=:siteid
    4. Remarks: Relationship to the WORKLOG table, used to find all work log records for a given Location record. The resulting set will contain zero or more records.
  5. Click the Save button

Step 3: Add Screen Changes

This is where the fun begins! We need to add the Work Log screen details to our Locations application in Application Designer. The steps below can be simplified by copying and pasting the XML for the new Work Log screen details into the exported Location XML file, and importing the resulting file back. If you run into trouble, watch our YouTube video on how to perform these steps.

  1. Log into Maximo as an administrative user
  2. Navigate to the System Configuration > Platform Configuration > Application Designer application
  3. Locate the LOCATION application, then navigate to the Workspace tab
  4. Click the Export Application Definition button on the toolbar (ensure your popup blocker allows popups from the Maximo URL)
  5. Save the resulting XML file to a local or network drive
  6. Edit the LOCATION.XML file with your favorite text editor
  7. Add the following <tab> control to the document after the last <tab> control in the main tab group:
    <tab id="log_tab" label="Log">
    	<section border="true" id="log_section">
    		<sectionrow id="log_section_r1">
    			<sectioncol id="log_section_r1c1">
    				<section id="log_section_r1c1_1">
    					<multiparttextbox dataattribute="location" descdataattribute="description" id="log_section_r1c1_1_attr_1"/>
    			<sectioncol id="log_section_r1c2">
    				<section id="log_section_r1c2_1">
    					<textbox dataattribute="siteid" id="log_section_r1c2_1_attr_1"/>
    	<table id="worklog" label="Work Logs" orderby="createdate desc" relationship="WORKLOG">
    		<tablebody displayrowsperpage="18" filterable="true" id="worklog_tb">
    			<tablecol filterable="false" hidden="false" id="worklog_tb1" mxevent="toggledetailstate" mxevent_desc="Show Detail" sortable="false" type="event"/>
    			<tablecol dataattribute="recordkey" id="worklog_tb2" sortable="true">
    				<textbox id="worklog_tb2_1" menutype="hyperlink"/>
    			<tablecol dataattribute="class" id="worklog_tb3" sortable="true"/>
    			<tablecol dataattribute="createby" id="worklog_tb4" sortable="true"/>
    			<tablecol dataattribute="createdate" id="worklog_tb5" sortable="true"/>
    			<tablecol dataattribute="logtype" id="worklog_tb6" linkedcontrolid="worklog_tb_details_sec17" sortable="true"/>
    			<tablecol dataattribute="description" id="worklog_tb7" sortable="true"/>
    			<tablecol dataattribute="clientviewable" id="worklog_tb8" sortable="true"/>
    			<tablecol filterable="false" hidden="false" id="worklog_tb_delete" mxevent="toggledeleterow" mxevent_desc="Mark Row for Delete" mxevent_icon="btn_garbage.gif" sortable="false" type="event"/>
    		<tabledetails id="worklog_tb_details">
    			<section id="worklog_tb_details_sec1" label="Details">
    				<sectionrow id="worklog_tb_details_row1">
    					<sectioncol id="worklog_tb_details_row1_col1">
    						<section id="worklog_tb_details_row1_col1_1">
    							<textbox dataattribute="recordkey" id="worklog_tb_details_sec11" menutype="hyperlink"/>
    							<textbox dataattribute="class" id="worklog_tb_details_sec12"/>
    							<textbox dataattribute="createby" id="worklog_tb_details_sec13"/>
    							<textbox dataattribute="createdate" displaytype="DATETIME" id="worklog_tb_details_sec16"/>
    							<textbox dataattribute="logtype" id="worklog_tb_details_sec17" lookup="valuelist"/>
    							<checkbox dataattribute="clientviewable" id="worklog_tb_details_sec18"/>
    					<sectioncol id="worklog_tb_details_row1_col2">
    						<section id="worklog_tb_details_row1_col2_1">
    							<textbox dataattribute="description" id="worklog_tb_details_sec14" lookup="longdesc"/>
    							<richtexteditor dataattribute="description_longdescription" height="100" id="worklog_tb_details_sec15" width="660"/>
    		<buttongroup id="worklog_buttons">
    			<pushbutton default="true" id="worklog_newrow" label="New Row" mxevent="addrow"/>
  8. A couple of notes:
    1. If you are linking to an object other than Locations, be sure to change the header <section> control to reference the primary key of the object you are linking to.
    2. If you don’t want to allow for deletion of a row, or want to control deletion through a Signature Option, you can remove or modify the <tablecol> control with the toggledeleterow event.
  9. Save the LOCATION.XML file
  10. Import the LOCATION.XML file back into Application Designer by using the Import Application Definition button on the toolbar.

Step 4: Link the Records

In order for this to work, we’ll need to create a simple Automation Script to link the Work Log entry with its parent Location. This script will fire upon add of a new WORKLOG entry, and will populate the Record Class and Record Key fields on the WORKLOG table from the parent Location record. This ensures that the current Work Log entry is linked to the proper Location.

  1. Log into Maximo as an Administrative user
  2. Navigate to the System Configuration > Platform Configuration > Automation Scripts application.
  3. From the Select Action menu, choose the Create > Script option
    1. Script: WORKLOG.NEW
    2. Description: Work Log Script on Add
    3. Script Language: python
    4. Log Level: ERROR
    5. Active: Yes
  4. Source Code:
    ownerMbo = mbo.getOwner()
    if ownerMbo and ownerMbo.isBasedOn("LOCATIONS"):
        mbo.setValue("RECORDKEY", ownerMbo.getString("LOCATION"), mbo.NOACCESSCHECK|mbo.NOACTION|mbo.NOVALIDATION)


  5. Click the Create button

Step 5: Test the Solution

Now that it’s configured, it is time to try out our solution.

  1. Log into Maximo
  2. Navigate to the Assets > Locations application
  3. Find a Location that you would like to add a new Work Log entry against. In this case, we are looking at the ADDR201 Location from the Maximo Demo database.
  4. Click on the Log tab
  5. Click the New Row button
  6. Fill out the pertinent details
  7. Click the Save button

Congratulations! We have Work Logs on Locations. For a visual instruction of the previous steps, check out our video tutorial.


We love hearing from our readers!  Feel free to leave comments or feedback below.