2

Maximo 7.6.1.1/Oracle 12c:

Is there a way to select the latest n workorders using the List View in Work Order Tracking?

  • Example: the workorders with the 10 latest reportdates.

It would be preferable if there was a way for non-technical users to do this using OOB functionality.

User1974
  • 276
  • 1
  • 17
  • 63

1 Answers1

1

One way to do this would be to save a WHERE CLAUSE query:

and wonum in(select wonum from workorder where siteid = 'SERVICES' order by reportdate desc fetch first 10 row only)

However, I wouldn't call this out-of-box functionality.

enter image description here

More information about the Oracle SQL here: Get last record of result set

User1974
  • 276
  • 1
  • 17
  • 63
  • 2
    If reported date were a field on the list screen (it can be added), you can then click to sort on it. The first page of the list screen would then only be the most recent X records. If you have a large data set though, this might not perform as well, but this would also work for all database vendors. – Dex Feb 23 '20 at 16:31
  • 2
    Don't forget to add the `siteid` in the subquery too. – JPTremblay Feb 24 '20 at 14:21
  • 1
    @JPTremblay Good point. In my case, we only have **one org** and **one site**. But most people will have multiple sites. – User1974 Feb 24 '20 at 15:03
  • 2
    The reason you want to add the `siteid` in your subquery is because you want to use the index. You'll get better performance even if you have only one site/org. Also, it's good practice because you won't have to worry to change a bunch of queries in 5 years when they want to add a new site. – JPTremblay Feb 24 '20 at 15:34