Menu

Maximo Mobile Customization– Adding new field with lookup values

Prashant sharma

3 mins

Maximo Mobile Customization– Adding new field with lookup values

IBM Maximo Mobile is available with Maximo Application Suite (MAS) which provides the ability for users to work on Work Orders, Inventory and others based on access. Many times, customer has different processes which need customization into Maximo Mobile functionality.

Add new field with lookup value into Edit Work Order

Maximo Mobile provides ability to edit the existing work order available in My Schedule page. This is how out of the box work order edit screen looks like- 

OOB Edit WO Fields

In this requirement, customer X wants to add new field Owner Group into detail page of Work Orders after work type field. On clicking of this field, customer shall be able to see list of Owner Groups available in Maximo and shall be able to select one of them.

Steps to follow-

Open Maximo Application Framework (MAF) by starting the docker image and duplicate application TECHMOBILE. Once application is duplicated access TECHMOBILE application via Maximo Application Framework (MAF) in browser.

First step is to go to Maximo > Object Structure application and search for MXWOAPIDETAIL. Open this and from select action - Exclude/Include attribute, uncheck the checkbox on Work Order object’s OWNERGROUP field.

MXAPIWODETAIL (1)

Now open app.xml of Maximo Mobile in MAF and search for xml tag-

<json-datasource id="dsWoedit" src="{[]}" selection-mode="none" id-attribute="workorderid" auto-save="false">

Under this <schema id="kk3ex"> tag add following XML entry-

<attribute name="ownergroup" id="bk9b4"/>

Next step is to add lookup to display the list of owner groups. For this search tag - 

<dialogs id="d_4kb">

Under this add entry given below- 

<lookup id="ownergroupLookup" datasource="persongroupLookupDS" border="true" show-count="true" show-search="true" tight="true" lookup-attributes="{['persongroup', 'description']}" on-item-click="selectOwnerGroup" height="400" width="60" lookup-heading="Owner Group"/>

Search for tag 

<border-layout padding="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? 'false' : 'true'}" fill-parent="true" width="100%" id="nqgrp">

Above it place tag as given below to add Owner Group field and add lookup created in earlier step with it.

<box padding-top="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? '1' : '.5'}" id="e34k91"/>

        <box direction="column" background-color="field-01" padding="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? 0 : 0.5}" id="z7znb1">

          <smart-input label="Owner Group" theme="dark" placeholder="Owner Group" value="{dsWoedit.item.ownergroup}" select-lookup-attribute="persongroup" lookup="ownergroupLookup" enable-lookup-buttongroup="true" id="nx9qa"/>

        </box>

Click on Save button to save XML. 

If you click on Preview button, you will be able to see Owner Group field added after Work Type field. 

Lookup-1

Clicking on field will show the list of Owner Groups available in Maximo. 

Lookup-2

Clicking on one will set the value in owner group field.

Lookup-3

Conclusion

As shown in steps above, using XML tags, a field Owner Group can be added. Once all changes are done, user need to click on Publish button available on the right-hand corner in Maximo Application Framework application which will push the configuration changed to Maximo Server.

Need one place to track, control and manage your enterprise assets?
Get started

Tags