July 30, 2012

Change the default table sorting

Many Maximo applications have a default sort in the tables that displays objects both in the 'List' tab and in the details of the objects. Those default order by clauses can be easily changed with the Application Designer.
This technique, used in conjunction with the automatic display of table results, can greatly improve the usability of a Maximo application and speedup the completion of user's tasks.
For example you may want to show the work orders with nearest Scheduled Start in the Work Order Tracking application.
Open the WOTRACK application in the Application Designer and select main table. Right click on it and select 'Properties' to bring up the Control Properties dialog. Type 'WOPRIORITY' the Order By field and then select the 'Start Empty' checkbox and untick it again.


Close the Control Properties dialog and save the application.
Now open the Work Order Tracking application and you will see that the work orders with the lower priority will be automatically listed.
If you want to reverse the ordering use the DESC keyword. In our example the Order By field will be 'WOPRIORITY DESC'.
The same technique can also be used to modify the sorting of the tables in the other application tabs.

14 comments:

  1. Good info - Thanks! What about the case where I'm in WorkOrder and want to set status? My dropdown Status list is out of order and jumbled. How do I get the status list to sort alphabetically?

    ReplyDelete
    Replies
    1. Workorder.Status field is linked to WOSTATUS synonym domain. The display order of synonym domains is the same as they are defined in the Domains application.
      For lookups there is a 'orderby' clause that can be used in the LOOKUPS.XML file.
      Regards

      Delete
  2. I've always wondered why the oldest Work Order numbers appear. I tried to make a Saved Query with an Order By, but that caused issues when I tried to filter with other field values.

    This is exactly what I needed. I don't know what I'd do with you...

    ReplyDelete
    Replies
    1. I'd do without you.

      I tried to using the ORDER BY form field in the Application Designer for Maximo 6.2.8. It doesn't work for me. This works fine in Maximo 7.5.0.4.

      Delete
  3. Also, there seems to be two places where ORDER BY is available. They are both in Application Designer, but one is in the presentation layer (if you Toggle Show All under Select Action) and another like you mention your article. Which ORDER BY field is best to use? Presentation layer or the one in your article? Here's the IBM technote: http://www-01.ibm.com/support/docview.wss?uid=swg21318052

    ReplyDelete
  4. I am using similar code to test rim connection through a firewall. Passing a NAT'd I address. Error message come back with local host ip. Feels like a configuration issue. Any ideas?

    ReplyDelete
  5. I am using similar code to test rim connection through a firewall. Passing a NAT'd I address. Error message come back with local host ip. Feels like a configuration issue. Any ideas?

    ReplyDelete
  6. Hi Everyone, I am stuck with one peculiar issue in Purchase contract application.In contract line section, Line Type drop down ideally should show value in order, ITEM,Material, Service, Std. Service, tool.But in my case its coming as Std. service,Tool, Material, item , Service.I have checked all possible reason but could not find anything.can anyone help me put.

    ReplyDelete
  7. Can you order by two columns. For example, in the Calendar application, I want to sort the Work Periods table first by Work Date, then by Shift

    ReplyDelete
    Replies
    1. Actually I discovered that in the Application Designer, if you use the Order By field in the Table Properties dialog, you can set multiple such as "WORKDATE, SHIFTNUM" and it DOES work until you are in the application and manually click to sort in on a column, then it defaults back to just one sort at a time. You have to leave the application (not Maximo, just the application, in this case Calendar) and then it'll be sorted on 2 columns again.

      Delete
  8. I am running into very odd situation..when I am trying to order by on Asset --> Asset --> Work tab on work order (order by statusdate)

    After adding order by in table properties...and checking for data on Asset --> Asset --> Work tab, data is getting disappeared...and on removing order by I am seeing the data...can you help me to know the root cause...

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. I am facing the same issue here in the Asset --> Assets --> Related Records. I can't sort Work Orders by Schedstart date. Tried the option you just mentioned, but the data disappears. When I remove the condition, data comes up again. Please help.

    ReplyDelete