Setting the sort order of Select Value dialog box in Maximo

One of the under-appreciated functions in Maximo is the ability to create custom value lists for a field using a Domain. The use of a Domain value list helps guide a Maximo user to use a specific set of choices to align the data choices used on a given field.

Maximo sorts the dialog box displaying the Domain value list in descending order by default. However, for some fields in Maximo this won't make sense - e.g. WO Priority.

Work Order priority by design is a descending value list, meaning the lower the number, the lower priority.

But when viewing a WO Priority value in Maximo, the sort order defaults to an ascending order.

This sort order places the highest priority at the bottom and contradicts the concept that the WO priority should be highest to lowest value.

Adding a new VALUELIST lookup

In Application Designer, the way a Domain value list is associated with a field is by setting the look up to VALUELIST.

The dialog box for the VALUELIST is set in the system XML file LOOKUPS.XML. To get the dialog box to sort in another order we need to add a new entry to the LOOKUPS.XML design file.

Open up Application Design and export the LOOKUPS.XML to your desktop.1 Open the file in a text editor and search for the text string table id="valuelist". You will find an entry for the Domain value list dialog box like this:

<table id="valuelist" inputmode="readonly" selectmode="single" >
    <tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="valuelist_lookup_tablebody">
        <tablecol dataattribute="value" id="valuelist_lookup_tablebody_col_5" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
        <tablecol dataattribute="description" id="valuelist_lookup_tablebody_col_6" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

Copy the entry above to a new document in your text editor and use the replace function to replace entries valuelist with valuelist_desc. Then add orderby="value desc" to the end of the first line. Your code snippet should look like this:

<table id="valuelist_desc" inputmode="readonly" selectmode="single" orderby="value desc">
    <tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="valuelist_desc_lookup_tablebody">
        <tablecol dataattribute="value" id="valuelist_desc_lookup_tablebody_col_desc5" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
        <tablecol dataattribute="description" id="valuelist_desc_lookup_tablebody_col_desc6" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

Copy the code snippet and paste it below the original valuelist code. Save the XML file and re-import the LOOKUPS.XML file into Maximo.

With the new dialog box in Maximo, you can update the lookup on a field in Application Designer. In the example below I updated the look up for the WOPRIORITY field in the WO Tracking app.

With the new value list look up, Maximo will set the sort order of the dialog box to have the key values sorted in descending order.

Now the value list Maximo users interact with match the top down concept of work order priorities.

  1. Make a back up copy of the XML file in case you make a mistake.  

Previous posts:

  1. Extending BIRT's hidden parameters - Pt 2

    I've continued to experiment with the use of Maximo BIRT's hidden parameter. In my previous post I was able to display values that were generated by related information of the Maximo user who ran the report. But the original data selection used the hidden username parameter in the SQL where …

  2. Extending the use of Maximo's hidden BIRT parameter

    One of the common queries used by Maximo power users is:

    siteid = (select defsite from maxusers where userid = :user)

    This selection limits records to the default site the current Maximo user is checked into. So if a query is saved for future use, it will work with any site a …

  3. Conditionally make 'Memo' a requirement

    I will always admit I get inspiration on how I administer my company's Maximo environment from other sources. The most recent update I've made to our Maximo environment was based on a something I've had on the back burner, but got a virtual nudge from Steven Shull (@shullsa) after reading …

  4. Controlling BIRT Chart Colors in Maximo

    One of the efforts I'm making as we head into 20201 is data consistency. I started looking at some of our key reports and noticed that as our maturity evolved, our reports evolved as well, but sometimes in a disjointed way. We'd discover a new technique in BIRT or …

  5. Running a Maximo Escalation to catch an event every 30d

    I normally read through the Maximo forums for new ideas or lend a helping hand when I can. A recent question was asked on how to have a Maximo Escalation send a notification every 3 months.

    Looking at the question, there were a couple of points raised:

    • The escalation needs …