Maximo

Maximo

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

 View Only
  • 1.  Enabling sorting on fields shown using relationships

    Posted 08/16/22 04:50 PM
    Hi Guys,
    In Maximo if a field is shown in applications, which is displayed using relationship... e.g., owner description in WO and / or SR, then on list tabs and in Result Sets on Start Centers... these fields are searchable but are not sortable...

    Is there a way how these fields can be enabled for sorting... without having to physically adding that field in objects?

    Thanks in Advance

    ------------------------------
    mx pro
    ON
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Enabling sorting on fields shown using relationships

    Posted 08/17/22 01:37 AM
    Simple answer, no.

    My only solution is to crossover the foreign field into a new custom field, then add that to your search.

    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2022
    ------------------------------



  • 3.  RE: Enabling sorting on fields shown using relationships

    Posted 08/17/22 07:55 AM
    As Craig mentioned, this isn't possible without bringing the value over persistently somehow. The reason is our query is always against the main object (such as WORKORDER) and doesn't join any of the child tables (IE left join asset on asset.assetnum=workorder.assetnum and asset.siteid=workorder.siteid). Without joining the objects, we can't do an order by from a child table.

    We can filter child objects because we build an exists statement based on the relationship and your filter (IE exists(select * from asset where asset.assetnum=workorder.assetnum and asset.siteid=workorder.siteid and asset.description like '%my search%')). 

    With the REST API, we added the ability to sort through relationships and non-persistent attributes but that's performed entirely in memory so only works well with relatively small data sets. You wouldn't want to use it to sort millions of records for example.

    Our new Maximo Application Framework (Graphite) also renders tables where searches and ordering of columns can occur on the client side as long as we have all the data.  Some of these issues will go away as we move more applications over to that framework but it will take time to get our applications moved over to the new framework.

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



  • 4.  RE: Enabling sorting on fields shown using relationships

    Posted 08/17/22 08:22 AM
    thanks for the replies Craig and Steven.
    We are already doing what you both mentioned, but wanted to ask if there is another solution... which appears to be not
    thanks any ways for this

    ------------------------------
    mx pro
    ON
    ------------------------------



  • 5.  RE: Enabling sorting on fields shown using relationships

    Posted 08/18/22 12:21 PM
    Depending on the specifics, one other option is to create a view that combines two tables (see WORelease as an example).  If the purpose is mostly on a portlet, then creating a view, a dummy app (unfortunately portlets need to be tied to an app) and the portlet you could then sort on that field.  This could be similarly used as a real app if this is mostly for a read only version or only needs some basic processing (CRUD or Change Status or the like, likely not multiple tabs, etc).  Obviously this is unwieldy in many circumstances, but can work for some  depending on the requirement.

    ------------------------------
    Steve Hauptman
    ------------------------------