Maximo

Maximo

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

 View Only
  • 1.  MXAPILOCATIONS ordering

    Posted Tue March 11, 2025 05:19 PM

    Hello,

    I am trying to display Locations in my app, I have right object-structure and query, but I have problem with OSLC. Here is a snippet of code: 

    <maximo-datasource cache-expiry-ms="86400000" controller="LocationListDataController" geometry-format="geojson" id="locationListDS" object-structure="MXAPILOCATIONS" offline-immediate-download="false" order-by="locations" pre-load="false" saved-query="SHOWLOCATIONS" selection-mode="single">
    and these is ERROR message which I am getting: Invalid OSLC order by identifier locations specified. Make sure the identifier is included in the resource definition.
    I would be glad for every advice.
    Kind regards


    ------------------------------
    Vojtěch Šustek
    ------------------------------


  • 2.  RE: MXAPILOCATIONS ordering

    Posted Tue March 11, 2025 05:24 PM

    Hi Vojtěch

    There is bug in order-by property. Please use order-by="location" instead of order-by="locations".

    Locations is the object name but in order-by section you need to use attribute/column which is "location".



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 3.  RE: MXAPILOCATIONS ordering

    Posted Wed March 12, 2025 05:32 AM

    Hi Bartosz,

    Thank you so much for your answer. I've tried order-by="location" as you suggested, but when I preview my application it writes System message: The relationship LOCATION does not exist for business object LOCATIONS. Verify that the relationship specified in parameter LOCATION exists in the Maxrelationship table.

    Kind regards



    ------------------------------
    Vojtěch Šustek
    ------------------------------



  • 4.  RE: MXAPILOCATIONS ordering

    Posted Wed March 12, 2025 07:17 AM

    Hi Vojtěch

    It's not that easy to help without knowing the whole customisation that you did in this area (for example attributes definition in maximo-datasource tag). 

    I can see that you are using this controller="LocationListDataController". For me it looks like custom one as well. Do you really need controller for this datasource?



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 5.  RE: MXAPILOCATIONS ordering

    Posted Wed March 12, 2025 09:22 AM

    Hi Bartozs, 

    I'm recreating Assets application into Locations application, so I am rewriting original code for my needs. In Original Assets application there is DS AssetListDataController. I have also rewrited that DS for my needs. I know it's a bit complicated. Thank you for your efforts!



    ------------------------------
    Vojtěch Šustek
    ------------------------------



  • 6.  RE: MXAPILOCATIONS ordering

    Posted Wed March 12, 2025 09:47 AM

    Hi Vojtěch,

    Understand, if may I suggest something, I would start by debugging this LocationListDataController (using Developer Tools built in the browser).



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 7.  RE: MXAPILOCATIONS ordering

    Posted Wed March 12, 2025 03:36 PM

    Hi Bartosz,

    Thank you for your answer! I will use your advices, hopefully I will make it work. Developer Tools might be a good way to start. 



    ------------------------------
    Vojtěch Šustek
    ------------------------------