Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  List View: Sort on related/persistent field?

    Posted Thu December 02, 2021 11:36 PM
    MAM 7.6.1.2:

    Report Administration application:

    I've added a related/persistent field to the list view: REPORTADHOC.REPORTOBJECT.



    In the Report Administration list view, I can't seem to sort on that field. Clicking on the field's label doesn't do anything since it's not a hyperlink. Does that mean it's not possible to sort on related/persistent fields in the list view?
    I'm able to filter on that field (example: !=~null~), so I thought I'd be able to sort on it too.

    Thanks.

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: List View: Sort on related/persistent field?

    Posted Fri December 03, 2021 08:15 AM
    Unfortunately it's not possible to sort through a relationship today. When you query through a relationship it's done as an exists statement (not a join) so it can't be ordered by the database. And in the classic UI, the data isn't retrieved for each of the records so it couldn't be done locally.

    I had submitted this as a RFE (https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=37940). While it's flagged as delivered, it was added to the REST API and is not available in the classic UI. I haven't tested this scenario in the new UI framework yet to see if it would allow the sort on child objects but that framework will be where this capability is added.

    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: List View: Sort on related/persistent field?

    Posted Fri December 03, 2021 12:53 PM
    Edited by System Admin Wed March 22, 2023 11:47 AM
    Thanks.

    Just for my records (re the classic UI):
    We've established that sorting on related/persistent fields isn't possible. But that's not to be confused with sorting on non-persistent fields from the main object -- which is possible (I often forget that).
    For example, it is possible to sort on the non-persistent HIERARCHYPATH field in the Classifications application list view. Although sorting on that field is quite slow when compared to sorting on a database column or a calculated field in a view. But that's not a surprise when there are over 2500 CLASSSTRUCTURE records.

    I just wanted to write that out to make sure I understood correctly.



  • 4.  RE: List View: Sort on related/persistent field?

    Posted Tue December 07, 2021 08:15 AM
    Hi User1917,

    I came up with a workaround that might help regarding this issue - based on fact that sorting on non-persistent field from the main object is possible.

    In your case, I created a non persistent field MXKREPORTOBJECT1 (had to be ALN type) on the main object REPORT, which draws data from related/persistent field REPORTOBJECT through relationship REPORTADHOC, using attribute maximo formula: NVL(reportadhoc$reportobject,"NONE") .

    Then I included new field on List tab, sort worked by hyperlink (also works by Where clause order by mxkreportobject1 desc):


    Solution is not perfect and would not be suitable for large amounts of data (there are also conditions possible on maximo formulas to limit data).
    I hope it helps.

    Best Regards,
    Jani Naglič, Kopa

    ------------------------------
    Jani Naglic
    Kopa d.d.
    Slovenj Gradec
    ------------------------------