Implement a Refresh List button

We all know IBM Maximo is not a monitoring console and has no auto-refresh feature in the start center or in the applications. However, in some situations, we may need a Refresh button to reload the content of a table in a Maximo application.

In this example I have added a button to refresh the Asset History tab in the Locations application.

This little customization does not require Java or automation scripts. It is just the button definition in the application with a small trick.

Open the Application Designer application and open the LOCATION app. Download the application definition. Now edit the location.xml file you have downloaded and search for ‘history_history_table’.

Insert the following XML fragment in bold just before the history_history_table table definition.

<section id="mxlrefresh">
  <buttongroup id="mxlrefreshbtngrp" align="left">
    <pushbutton id="mxlrefreshbtn" label="Refresh" default="true" width="200" targetid="history_history_table" mxevent="reset"/>
  </buttongroup>
</section>
<table id="history_history_table" inputmode="readonly" label="Assets" orderby="assetnum" relationship="PLUSCASSETTRANSMOVED">
...

Update the application definition uploading the location.xml file and you are done. If you now open a location and move to the History tab will see the Refresh button. Move any asset to/from the location (from a different browser window) and then click the Refresh button on the location and you will see a new row appearing.

Here are the explainations of the button attributes I have used:

  • label – This is the text that appears on the button. Change it as you wish.
  • default – Setting this to ‘true’ will highlight the button. It can be removed.
  • width – Size of the button. I have make it slightly bigger. It can be removed.
  • targetid – This must be set to the id of the table you have to refresh. See the example. It allows to place the button outside the table itself and better layout the page.
  • mxevent – Always use ‘reset’ event to force the reload of the table referenced by the targetid attribute.

How it works

For those of you who really want to understand how this little trick works, here is the explaination.

When a Maximo event is triggered from the UI, the framework searches through the application layers until it finds a matching handler in: Actions (including action scripts), DataBean (maximouibeb), Mbo/MboSet (businessobjects).

In our case the ‘reset’ event will flow through all the layers and trigger the MboSet.reset() method. This will clear the MboSet in the memory and force a requery to the database.

Implement a Refresh List button

14 thoughts on “Implement a Refresh List button

    1. No. The reset event works on the MboSet so I don’t think it will work on the main object.

      1. Any other thoughts to refresh the entire mbo record?
        Ruud

    2. To refresh a single record, I use a cheap trick of placing the record key in the “Find ” field in the toolbar and clicking “Search”. There’s probably a way to autopop that field so it does a record refresh.

    3. Yes you can.
      Simply by setting the Target id: results_showlist in the properties of push button.

  1. Bruno, I tried this in the Work Order application –> Plans tab –> Children of Work Order – table
    Wanted the Work Order status to update on the child work order in the table, after you navigate t directly to the child work order record, change the Status and Return to the Parent Work Order. However it did not work. I updated the XML as follows:

  2. Thank you so much Bruno, It worked pretty good, We have a custom Clonned Workorder Application with the Children Workordres. Refresh Button Worked Great

  3. Hello,
    Your solution works fine on 7.6.1.1. However it does not work on 7.6.0.8. Any release limitation. The issue I am finding on 7.6.0.8 is, it is not firing object level save launch automation script after I click on “Ok” button of the dialog. It however fires init event.

    Any clue

  4. Is it not possible to get the refresh button like one in the list tab?

  5. Hello,
    Is this possible in an automationscript? If I open a record in a SR application somehow Maximo losses the focus on the main record. If I create a Refresh button everything is OK. But I like to do the refresh automaticly.
    Thanks,
    Roger

Leave a Reply to Mister Wanko Cancel reply

Your email address will not be published. Required fields are marked *

Scroll to top