Hi Patrik,
I don't know if you had a chance to read this
document that was created by IBM.
You can find these chapters there:
- Changing a label and adding a field
- Configuring queries
As you wrote you need to do two types of customisations in Maximo Mobile TECHMOBILE app.
1. Add new query
This customization will include these steps:
a) Add new dropdown-item definition into existing dropdown
<dropdown slot="dropdown" background-color="white" selected-item="{page.state.selectedDS}" id="rzvz4" on-change="loadWOListData" hide-unselected-placeholder="true">
(…)
<dropdown-item value="cTeam1WoDs" text="TEAM 1 WO" id="cust01"/>
(…)
</dropdown>
b) Add new maximo-datasource-override definition at the end of dswolist data source
<maximo-datasource id="dswolist" object-structure="mxapiwodetail" saved-query="uxtechnicianownerfilter" order-by="wopriority" pre-load="false" controller="ScheduleDataController" selection-mode="single">
(…)
<maximo-datasource-override id="cTeam1WoDs " saved-query="C_TEAM1WO" offline-immediate-download="true"/>
(…)
</maximo-datasource>
c) Define new query (C_TEAM1WO) in Maximo. Go To MXAPIWODETAIL object structure definition (More Actions -> Query Definition) and add new public osclause definition.
If you have a problem with that please check how ASSIGNEDWOLIST was created and used in Maximo Mobile.
2. Adding attributes to two views
Work Order Details view
a) Extend woDetailResource -> asset definition and add additional assetttag attribute
<maximo-datasource id="woDetailResource" default="true" object-structure="mxapiwodetail" where="wonum="{page.params.wonum}" and siteid="{page.params.siteid}"" controller="WorkOrderDataController" item-url="{page.params.href}" cache-expiry-ms="1">
<schema id="qmvzy">
(…)
<attribute name="asset" id="anxax">
(…)
<attribute name="assettag--assettag" id="cWoDetailsAssetTag"/>
</attribute>
(…)
b) Find this section and add assettag (page Work Order)
<adaptive-column small-width="100" medium-width="100" large-width="50" id="pwkd7">
<border-layout fill-parent="true" padding="false" id="mg_ke">
<top vertical-align="start" id="dw3bx">
<box direction="column" vertical-align="center" fill-parent="true" fill-child="true" padding-top="0.5" padding-bottom="0.5" id="vbpra">
<action-tag label="Up" type="warm-gray" icon="Carbon:arrow--up" hidden="{!woDetailResource.item.assetnum || !woDetailResource.item.assetisrunning}" id="g9beg"/>
<action-tag label="Down" type="warm-gray" icon="Carbon:arrow--down" hidden="{!woDetailResource.item.assetnum || woDetailResource.item.assetisrunning}" id="yb_dp"/>
<field hide-label="true" padding="none" value="{woDetailResource.item.assetnum}" id="de6m3"/>
<field hide-label="true" padding="none" value="{woDetailResource.item.assetdesc}" id="yzqaa"/>
<field hide-label="true" padding="none" value="{woDetailResource.item.locationdesc ? woDetailResource.item.locationdesc : woDetailResource.item.locationnum}" id="agajd"/>
<field hide-label="true" padding="none" value="{woDetailResource.item.assettag}" id="cWoDetailAssetTag"/>
</box>
</top>
</border-layout>
</adaptive-column>
My Schedule List view
If it comes to the list view, then I think you need to do similar thing and extend asset definition for dswolist data set and add new attribute definition in wo-card-group.xml (not app.xml)
<maximo-datasource id="dswolist" object-structure="mxapiwodetail" saved-query="uxtechnicianownerfilter" order-by="wopriority" pre-load="false" controller="ScheduleDataController" selection-mode="single">
<schema id="gjw7p">
(…)
<attribute name="asset" id="kjyen">
(…)
<attribute name="assettag--assettag" searchable="true" id="cDsWoListAssetTag"/>
</attribute>
------------------------------
Bartosz Marchewka
------------------------------
Original Message:
Sent: Wed March 29, 2023 01:55 PM
From: Patrik Nilsson
Subject: Configuration of TECHMOBILE
Hi,
I have a small challange to make a test for a client who is evaluating Maximo Mobile and want me to show that we can add assettag into 2 views in mobile and also add a saved query in My Schedule.
Anyone who can guide me on how to do it in MAF?
I have Docker installed and MAF, but it is not that easy to find where to add the fields and I do not understand ig I will need to add a automationscript to retrieve the information from asset.
The same goes for the query, seen some notes around changing Object structure queries and It might be so it has to be added in the objedt structure and then added in the xml as an option in the dropdown menu.
Add ASSET.ASSETTAG to following pages.
WORK ORDER LIST & WORK ORDER DETAILS and display the information from ASSET.
In My Schedule add a saved query to list WO for team 1
Work order query used today for Anywhere
((woclass = 'WORKORDER' or woclass = 'ACTIVITY')
and (status = 'APPR' or status = 'INPRG')
and historyflag = 0
and istask = 0
and siteid = 'BEDFORD')
and supervisor is null
and ((exists (select 1 from maximo.assignment where ((amcrew = (SELECT ownergroup FROM PERSON WHERE PERSONID=
(select personid from maxuser where userid= :user))||'1'))
and (exists (select 1 from workorder yy where ((yy.istask = 1 and yy.parent = workorder.wonum )
or (yy.wonum = workorder.wonum)) and assignment.wonum = yy.wonum and yy.siteid = workorder.siteid)
and siteid = workorder.siteid)))
or amcrew = (SELECT ownergroup FROM PERSON WHERE PERSONID=
(select personid from maxuser where userid= :user))||'1')
------------------------------
Patrik Nilsson
------------------------------