Skip to content

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.  

Share This

Related Posts

Preventing fields from Editing Once Record is in Workflow
Preventing fields from Editing Once Record is in Workflow I like this problem because it involves a few...
How to Enable Print Functionality in IBM Maximo
How to enable the print button in Maximo.   By default, Maximo only allows the MAXADMIN group to have...
WBENC Anoounement thumbnail

16 Responses


  1. When I added worklog to Companies object I got an error because the Company object is an ORG level object not a site level one. As such there is no SITEID attribute and the worklog threw an error when trying to add a new one. The only work around I could find was to add a new siteid attribute. Do you know a better work around?

    • Thanks for trying out our solution! While the WORKLOG object is a system-level object, you are correct in that this solution only works with site-level parent objects. Unfortunately there is code in the add() method of the Work Log MBO that attempts to set the Site ID of the Work Log to the SITEID attribute of the parent object. In the case of org-level objects, such as Companies, this will throw an exception.

      I see three possible options for a workaround, none of which I’m particularly fond of:

      1. Add a SITEID attribute to the parent object, such as Companies, as you’ve done
      2. Extend the Work Log MBO via Java customization, and override the add() method to conditionally set the Site ID
      3. Create a custom table that replicates the WORKLOG functionality
  2. Thank you for some other great post. The place else
    could anybody get that type of info in such an ideal manner of writing?
    I’ve a presentation next week, and I am at the look for such information.

  3. To provide auth to Worklog seems to require also granting the higher level “Save” authorization, which makes many fields editable.
    Have you run across a related requirement to provide a “view only” user only access to create worklog entries?
    Any ideas on how you might provide that kind of access?
    (By contrast to Worklog, granting Communication does not require granting Save.)


    • Hi Ed,

      You can use conditional UI to provide read only and save access on the Application UI based on a custom sig option and conditional UI.
      Create a Sigoption like “WorkLogSave”
      Configure conditional UI on the WorkLog Table to set “inputmode” property based on user’s access to WorkLogSave

      Prasad Bakal

  4. I added WorkLog to Assets app, and I am getting “Cannot add new row” error when I try to add a WorkLog! Don’t see anything in the logs

    • Never mind. I had added a prefix to the ASSET->WORKLOG relationship to identify it as a custom relationship, and had forgotten to change that in the screen XML. All is well.

  5. Is there a way to rollup all Child Work Order Work Logs to the Parent Work Order?

    • I believe so, although I’ve never tried that before. You should be able to adjust the relationship used to pull in the extra records. Just be careful – you’ll want to probably create a new relationship instead of modifying the existing one to be sure that other facets of the application aren’t adversely affected.

  6. Thank you for the great article.

    We have found a problem with the work log details text area. The font size of the text area by default is very small. The font size can be changed by highlighting it and selecting the size as medium or more. However, if one the size is changed on one line and hit Enter, the next line defaults to the small size again.

    Is there a way we can default / customize the size i.e. can we change the size to medium by default?

  7. We are a bunch of volunteers and starting a brand new scheme in our community.
    Your web site provided us with helpful info to work on. You’ve performed
    a formidable job and our whole neighborhood might be grateful to you.

    • Thanks! Hope it’s been helpful.

      • Hi Alex,

        Thanks for this great post. Prior to coming across this post, my team have been trying to track changes to PM by adding notes to the long description field of the PM application – which is you well know is very obscure and difficult to report on. Your guide has given me a better way to track changes to PMs in a more transparent way.

        What I’d like to do is put enforcement on it by mandating log entry prior to any ‘save’ action after changes. I’m still ong way from that though because, having followed your guide to the letter, I get everything except when I click on ‘New Row’ to add a new log, I don’t see a new row. Instead, when a click on the ‘List’ tab to exit, I get prompted to save. If I click ‘save’ i get the following error message:

        BMXAA7998E – You have not entered a value in the following required fields:
        > Record
        > Class
        Enter the required values before you save this record.

        What am I missing here, please?

        Your help is appreciated . And once again, thank you for the excellent post.

        Maximo 7.5.7

        • The issue is most likely with that Automation Script in Step 4. Make sure you change the references from LOCATION(S) to PM.

  8. Hi,
    I added this to Invoice and while everything looks good, when selectin ‘New Row’ nothing happens. Any advice?
    I changed everything from these instructions to Invoice related variables, fields but nothing. I have triple checked the script and xml but I’m not seeing anything.
    Anyone else have this issue?

    • Can you confirm that the script is running by putting some logging into the script?

Add a Comment