Maximo

 View Only
Expand all | Collapse all

How to use count of work order in maximo operational dashbords mas8 ?

  • 1.  How to use count of work order in maximo operational dashbords mas8 ?

    Posted Thu July 20, 2023 06:24 AM

    I'm trying to group data with status and where i need to see count of workorders with different status i.e APPR - 100 / WAPPR 25 
    but pie % term is getting 0 if i use anything except _id field and each slice of pie represent an work order.

    i want each slice showing count of work order with different different status like APPR/INPRG/COMP

    My current code :-

            <dashboard-chart-tile chart-type="pie" title="Pie Chart" subtitle="Just Trying Out" datasource="tmpiedata" size="mediumthin" allow-expand="true" allow-extra-action="true" tooltip="Pie Chart tile" info-tooltip-link="http://www.ibm.com" info-tooltip-link-text="Link" on-segment-click="{app.toast('You clicked' + arg)}" on-segment-click-arg="Pie Segment" id="nb3mn">
              <chart-option name="data.groupMapsTo" value="status" id="ke77g"/>
              <chart-option name="data.valueMapsTo" value="workorderid" id="kdn3b"/>
              <chart-legend alignment="end" id="yzwwm"/>
            </dashboard-chart-tile>



    ------------------------------
    Tejas Mahor
    ------------------------------


  • 2.  RE: How to use count of work order in maximo operational dashbords mas8 ?

    Posted Thu July 20, 2023 11:31 AM

    Hi Tejas,

    I think you need to properly prepare data source that you will use for this Pie Chart. In connection to your case you would like to show number of work orders peer status.

    Your data source should have two attributes STATUS (unique) and COUNT.

    You need to decide how to build it using:

    • maximo-datasource (then I think you need to prepare view on Maximo side and dedicated object structure)

    or

    • json-datasource (then you need to populate data in java script AppCustomizations.js as an example please review how IBM is doing that in their java script files)

    To put it simple (just to show you that if you have data source properly prepared then pie chart is working):

    json-datasource could look like this:

    <json-datasource id="pieChartDS" src="{[ {status: 'INPRG', count: 10}, {status: 'APPR', count: 4},  {status: 'COMP', count: 2}]}" id-attribute="status">
        <schema id="dpyn7">
          <attribute name="status" id="k8k8k"/>
          <attribute name="count" id="rawnz"/>
        </schema>
    </json-datasource>

    dashboard-chart

    <dashboard-chart-tile chart-type="pie" title="Pie Chart" subtitle="Just Trying Out" datasource="pieChartDS" size="mediumthin" 
              allow-expand="true" allow-extra-action="true" tooltip="Pie Chart tile" info-tooltip-link="http://www.ibm.com" 
              info-tooltip-link-text="Link" on-segment-click="{app.toast('You clicked' + arg)}" 
              on-segment-click-arg="Pie Segment" id="nb3mn">
              <chart-option name="data.groupMapsTo" value="status" id="ke77g"/>
              <chart-option name="data.valueMapsTo" value="count" id="kdn3b"/>
              <chart-legend alignment="end" id="yzwwm"/>
    </dashboard-chart-tile>

    Result in APP:

    More information about Charts and Data Sources you can find in: MAF-Development_Infomation.docx

    Good luck!



    ------------------------------
    Bartosz Marchewka
    ------------------------------