Maximo Open Forum

 View Only

 Mobile customization - Technician App.

  • Everything Maximo
  • Maximo Application Suite
  • Mobility
Suresh Babu's profile image
Suresh Babu posted 08-12-2025 01:11

I need to make WORKORDERSPEC data editable in the Maximo Technician Mobile application. I've created a custom data source and implemented a sliding drawer UI, similar to the one used for assets. While the sliding drawer shows the correct number of rows, the fields are blank.

My main question is how to correctly configure the WORKORDERSPEC table to be editable in the Technician application, specifically how to display and save the data within the sliding drawer.

Following are the changes I've done so far.

Data source:

---------------

<maximo-datasource id="woSpecResource" object-structure="MXAPIWO3" where="wonum=&quot;{page.params.wonum}&quot; and siteid=&quot;{page.params.siteid}&quot;">
        <schema id="">
          <attribute id="" name="wonum" unique-id="true"/>
          <attribute id="" name="description"/>
          <attribute id="" name="workorderid"/>
          <attribute id="" name="siteid"/>
          <attribute id="" name="orgid"/>
        </schema>
       
        <maximo-datasource depends-on="woSpecResource" id="woSpecResourceDs" id-attribute="workorderspecid" object-name="workorderspec" relationship="workorderspec" selection-mode="none">
          <schema id="">
            <mobile-child-filter id="" limit="50" order-by="-workorderspecid" related-path="workorder.workorderspecid"/>
            <attribute id="" name="workorderspecid" unique-id="true"/>
            <attribute id="" name="assetattrid"/>
            <attribute id="" name="measureunitid"/>
            <attribute id="" name="numvalue" scale="2"/>
            <attribute id="" name="alnvalue"/>
            <attribute id="" name="datevalue"/>
            <attribute id="" name="assetattribute.description--assetattributedesc"/>
            <attribute id="" name="displaysequence" sortable="true"/>
            
          </schema>
        </maximo-datasource>
 </maximo-datasource>



Displaying specification on work order details page:

--------------------------------------------------------------------
<box hidden="{page.state.noDataFoundErrMsg}" padding="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? '0' : '.5'}" padding-top="1" id="">
        <!--<border-layout hidden="{!woDetailResource.item.assetspeccount}" padding="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? '0' : '.5'}" fill-parent="true" id="">-->
          <border-layout  hidden="{!woSpecResourceDs.items.length === 0}" padding="{app.state.screen.size === 'sm' || app.state.screen.size === 'md' ? '0' : '.5'}" fill-parent="true" id="">
          <top vertical-align="center" id="">
            <label label="Specifications 2" theme="20-regular" id=""/>
            <button icon="carbon:edit" kind="ghost" padding="false" on-click="opencustomSpecificationDrawer2" on-click-arg="" id=""/>
          </top>
          <start id="" width="100">
            <data-list datasource="woSpecResourceDs" show-search="false" id="">
              <border-layout padding="false" slot="item" fill-parent="true" id="">
                <start width="50" id="" horizontal-overflow="hidden">
                  <box id="" fill-parent="true" vertical-align="center" fill-child="true">
                    <field label="{item.assetattributedesc ? item.assetattrid : null}" override-required="true" id="">
                      <sub-field value="{item.assetattributedesc || item.assetattrid}" id=""/>
                    </field>
                  </box>
                </start>
                <middle width="40" horizontal-align="end" horizontal-overflow="hidden" id="">
                  <box padding-end="1" fill-parent="true" fill-child="true" id="">
                    <field value="{item.numvalue || item.alnvalue || item.tablevalue || item.datevalue}" label="{item.measureunitid}" override-required="true" id=""/>
                  </box>
                </middle>
              </border-layout>
            </data-list>
          </start>
        </border-layout>
</box>

AppCustomization method to display the Sliding drawer:
-------------------------------------------------------------------------

async opencustomSpecificationDrawer2(evt) {
    const woSpecification2 = evt.page.datasources['woSpecResourceDs'];
    //await woSpecification.load({ noCache: true});
    //await this.checkDataType(event);
    evt.page.showDialog("customWOSpecificationDrawer2");
  }



Sliding drawer:

----------------------

<sliding-drawer id="customWOSpecificationDrawer2" content-padding="false" align="start" header-text="Edit specifications">
          <panel id="">
            <data-list datasource="woSpecResourceDs" padding="false" show-search="false" id="">
              <border-layout padding="false" slot="item" fill-parent="true" id="">
                <start horizontal-overflow="hidden" id="">
                  <box fill-parent="true" direction="column" hidden="{item.domainid != undefined}" padding-start="1" padding-end="1" fill-child="true" id="">
                    <smart-input value="{item.alnvalue}" hidden="{item.datatype_maxvalue !== 'ALN'}" input-kind="ALN" label="{item.computedLabel}" hide-step-buttons="true" id=""/>
                    <smart-input value="{item.numvalue}" hidden="{item.datatype_maxvalue !== 'NUMERIC'}" input-kind="DECIMAL" label="{item.computedLabel}" hide-step-buttons="true" id=""/>
                    <smart-input value="{item.datevalue}" hidden="{item.datatype_maxvalue !== 'DATE'}" input-kind="DATE" label="{item.computedLabel}" hide-step-buttons="true" id=""/>
                  </box>
                  <box fill-parent="true" hidden="{item.domainid == undefined}" padding="0.5" fill-child="true" id="">
                    <border-layout fill-parent="false" padding="false" middle-border="true" id="">
                      <start width="90" background-color="ui-01" horizontal-overflow="hidden" id="">
                        <box children-sizes="100" direction="column" padding-start="0.5" fill-child="true" fill-parent-horizontal="true" id="">
                          <field label="{item.computedLabel}" label-class-name="header-small" hidden="{item.datatype_maxvalue !== 'ALN'}" swap-position="false" id="">
                            <sub-field value="{item.alnvalue}" id=""/>
                          </field>
                          <field label="{item.assetattrid}" label-class-name="header-small" hidden="{item.datatype_maxvalue !== 'NUMERIC'}" swap-position="false" id="">
                            <sub-field value="{item.numvalue}" id=""/>
                          </field>
                          <field label="{item.assetattrid}" label-class-name="header-small" hidden="{item.datatype_maxvalue !== 'MAXTABLE'}" swap-position="false" id="">
                            <sub-field value="{item.tablevalue}" id=""/>
                          </field>
                          <field label="{item.assetattrid}" label-class-name="header-small" hidden="{item.datatype_maxvalue !== 'DATE'}" swap-position="false" id="">
                            <sub-field value="{item.datevalue}" id=""/>
                          </field>
                        </box>
                      </start>
                      <end width="10" background-color="ui-01" id="">
                        <button icon="carbon:chevron--right" on-click="openSpecLookup" on-click-arg="{{'page':page,'item':item}}" kind="ghost" padding="false" id=""/>
                      </end>
                    </border-layout>
                  </box>
                </start>
              </border-layout>
            </data-list>
          </panel>
          <button-group slot="header-button" align="end" id="">
            <button icon="carbon:checkmark" kind="primary" on-click="saveSpecification" on-click-arg="{{'item':woSpecResourceDs.items,'datasource':woSpecResourceDs}}" id=""/>
          </button-group>
</sliding-drawer>

Steven Shull's profile image
Steven Shull

Specifications are one of the most complicated configurations to do on mobile. And in 9.1 editing specifications is available out of the box. I would not try implementing this myself.

That being said, there are some key concepts to correct.

You cannot easily mix and match object structures for the transactional data like MXAPIWODETAIL (which is out of the box) & MXAPIWO3 (which you are referencing above). You shouldn't need to do this here because workorderspec is already part of the MAPIWODETAIL object structure.

Child datasources (IE maximo-datasource inside another maximo-datasource) needs to have an object-name referenced if you intend to update it and it doesn't match the relationship name. Maximo Mobile like most things that utilize the REST API will fetch data through relationships frequently. For example, asset.description. However, in order to modify the record, it needs to be part of the object structure and passed into the object structure in the format of objectname: [] or objectname: {} depending on if it's a 1:many or 1:1. Adding the object-name to the maximo-datasource element will help the framework know how to process it. 

You'll see some examples like evt.page.datasources['woSpecResourceDs']; out of the box, however, you should never use this approach. This is explicitly documented as not supported in the developer documentation in the wiki. Datasources are stored at either a page or app level and the product team reserves the right to break this in the future. You should always use this.app.findDatasource("woSpecResourceDs") instead. 

Suresh Babu's profile image
Suresh Babu

Hi @Steven Shull,

Good to hear that specifications are editable in Mobile 9.1. Once we upgrade, we plan to leverage the out-of-the-box functionality. However, at this stage, we have a requirement to make specifications editable in the Technician application in Mobile 9.0 with maximo 7.6.1.3.

I noticed that the WORKORDERSPEC object is not part of the MAPIWODETAIL object structure in Mobile 9.0. Since Maximo doesn't allow modifications to default Mobile object structures, I created a new object structure named MXAPIWO3, which includes only the WORKORDER and WORKORDERSPEC objects.

Could you please confirm if WORKORDERSPEC must be included in the MAPIWODETAIL object structure for updates to be supported from the Mobile application?
Alternatively, is it possible to reuse the out-of-the-box data source defined in the Technician application—used to display specifications in the side drawer dialog—to allow updates?

From what I see, in the default Mobile 9.0 configuration, specifications are fetched via a relationship and are displayed as read-only. Below is the data source currently used.

<maximo-datasource cache-expiry-ms="1" can-load="{!page.state.notLoadWoDetailChilds}" depends-on="woDetailResource" id="woSpecification" id-attribute="workorderspecid" notify-when-parent-loads="true" order-by="displaysequence" relationship="workorderspec" selection-mode="none">
          <schema id="myzw3">
            <attribute id="prr8j" name="workorderspecid" unique-id="true"/>
            <attribute id="y424j" name="assetattrid"/>
            <attribute id="qbw59" name="measureunitid"/>
            <attribute id="wj68z" name="numvalue" scale="2"/>
            <attribute id="n7v5d" name="alnvalue"/>
            <attribute id="ykr2x" name="datevalue"/>
            <attribute id="a4885" name="assetattribute.description--assetattributedesc"/>
            <attribute id="mmg76" name="displaysequence"/>
          </schema>
        </maximo-datasource>



Steven Shull's profile image
Steven Shull

Interesting, you are correct. I thought this was already part of the object structure since they were displaying the specifications, but it isn't. And because the object structure is not flagged as configurable, you cannot add a new object to the object structure in a supported way. You could trick the system to do it but then will likely encounter an error during the updatedb when you apply 9.1 as it tries to add it in.

This needs to be part of the object structure though to send data. The reason the two object structures is problematic is Maximo Mobile uses the href (which includes the object structure name) as the unique identifier for the record and for tagging all the transactions. When you have a separate object structure you have a different HREF which leads to a series of issues. You will need to add the WORKORDERSPEC object and use the WORKORDERSPECCLASS relationship.