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>
<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"/>
    </tablebody>
</table>

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"/>
    </tablebody>

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. 

Comments

Top