Maximo

Maximo

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

 View Only
  • 1.  Button count display Issue on Mobile Version of Asset Manager Application

    Posted yesterday
    Edited by Meghana Siriveli yesterday

    For a requirement in the Asset Manager application, I need to display a button labeled "Open Work Orders" below the "Attachments" button on the Asset Details page. This button should include a badge showing the count of open work orders, similar to how the Attachments button displays its count.
    I have implemented the following code to achieve this, and the changes are working as expected in the RBA application. However, the same changes are not reflecting in the mobile version of the app.

    A New button is placed in Asset Details page below Attachments button:
    --OOB
    <navigator-tile badge-type="dark-gray" badge-value="{assetDetailsDS.item.computedDocLinks}" id="ezp9j" onclick-action="showAttachmentPage" onclick-action-arg="{{'item':assetDetailsDS.item}}" pictogram="maximo:document--attachments" tile-label="Attachments"/>
    --Custom
    <navigator-tile badge-type="dark-gray" id="x_ezp9j" badge-value="{assetDetailsDS.item.xopenwocount}" onclick-action="showOpenWOPage" onclick-action-arg="{{'item':assetDetailsDS.item}}" tile-label="Open Work Orders"/>

    Definition of xopenwocount in maximo datasource id="assetDetailsDS" similar to doclinkscount
    --Custom
    <attribute id="xwo" name="xopenwo">
    <attribute id="xwo1" name="_dbcount--xopenwocount"/>
    </attribute>

    --OOB
    <attribute id="be5g3" name="doclinks">
    <attribute id="dye3k" name="_dbcount--doclinkscount"/>
    </attribute>


    xopenwo is a realtionship name from Asset to Workorder with the following where clause:

    assetnum = :assetnum and historyflag = 0 and siteid=:siteid order by reportdate desc fetch first 50 rows only


    Any Pointers would be really helpful
    ------------------------------
    Meghana Siriveli
    ------------------------------



  • 2.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted yesterday
    Edited by Bartosz Marchewka yesterday

    Hi Meghana,

    I did similar customisation in TECHMOBILE application. In my opinion you did it in a correct way.

    What I'm suggesting you is to check two things:

    1. If cache-expiry-ms property that is set for assetDetailsDS datasource definition has an impact for your customisation:
    <maximo-datasource id="assetDetailsDS" object-structure="MXAPIASSET" selection-mode="single" controller="AssetDetailsDataController" item-url="{page.params.href}" cache-expiry-ms="86400000">

        2. If part from your maxrelationship  order by reportdate desc fetch first 50 rows only doesn't have any negative impact (please remove it for test purposes) 

    Please see my customisation below.

    TECHMOBILE - show count value for child work orders

    <maximo-datasource id="woDetailResource" default="true" object-structure="mxapiwodetail" where="wonum=&quot;{page.params.wonum}&quot; and siteid=&quot;{page.params.siteid}&quot;" controller="WorkOrderDataController" item-url="{page.params.href}" cache-expiry-ms="1" geometry-format="geojson">
            (...)
            <attribute name="showchildren" id="cWOChild">
                <attribute name="_dbcount--childwocount" id="cWOChildCount"/>
            </attribute>
            (...)
    </maximo-datasource>
    (...)
    <navigator width="100%" theme="ui-05" mode="list" fade-background-color="false" id="wr9je">
        <navigator-tile tile-label="Children of Work Order" pictogram="maximo:add-record" onclick-action="showWOChildPage" onclick-action-arg="{{'item':woDetailResource.item}}" badge-value="{woDetailResource.item.childwocount}" hidden="{woDetailResource.item.childwocount == 0}" id="cWODetailsChildWorkordersNavigation" badge-type="dark-gray"/>
        (....)
    </navigator>
    



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



  • 3.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 9 hours ago

    hello
    juste to make sure , your custom relationship xopenwo and attribute xopenwocount are available and marked as Include = Yes and Is Published = Yes ?



    ------------------------------
    Khairi Chmengui
    ------------------------------



  • 4.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 8 hours ago

    Hello Kahiri, 

    Can you please confirm where can I find this Include and IsPublished ? 



    ------------------------------
    Meghana Siriveli
    ------------------------------



  • 5.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 8 hours ago
    Edited by Khairi Chmengui 8 hours ago

    Hi

    those two flags are part of the configuration for Object Structures in Maximo's Integration Framework.



    ------------------------------
    Khairi Chmengui
    ------------------------------



  • 6.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 8 hours ago

    Hi Khairi,

    xopenwo is relationship and xopenwocount is alias. What do you mean by marked them as Included and Is Published.

    In my opinion there are no such options for relationship and alias.



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



  • 7.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 6 hours ago

    Hi Bartosz,

    The button count is not displayed during the page Initialization. When I navigate back to List page, click on Check for Updates, and navigate back to Details page, I can see the count. 

    The same behavior is observed for adding some fields from asset table on the details page. The value is blank when the page is first opened, but system is fetching values on check for updates button 



    ------------------------------
    Meghana Siriveli
    ------------------------------



  • 8.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 6 hours ago
    Edited by Bartosz Marchewka 6 hours ago

    Hi Meghana,

    Did you try to remove cache-expiry-ms property from assetDetailsDS maximo datasource, just for verification?

    Before:

    <maximo-datasource id="assetDetailsDS" object-structure="MXAPIASSET" selection-mode="single" controller="AssetDetailsDataController" item-url="{page.params.href}" cache-expiry-ms="86400000">

    After:

    <maximo-datasource id="assetDetailsDS" object-structure="MXAPIASSET" selection-mode="single" controller="AssetDetailsDataController" item-url="{page.params.href}">



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



  • 9.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 5 hours ago

    Meghana, this behavior might also be related to the pre-loaded database. If you are using a pre-loaded database and it wasn't regenerated after adding new fields, those fields will only appear once you force a data refresh.



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



  • 10.  RE: Button count display Issue on Mobile Version of Asset Manager Application

    Posted 3 hours ago

    hello 

    you're correct Include = Yes and Is Published = Yes  apply to child objects in an Object Structure, not directly to relationships or aliases within an MBO or relationship

    i want @Meghana Siriveli to make sure they are visible in the JSON payload



    ------------------------------
    Khairi Chmengui
    ------------------------------