Include memo to labor transaction
About this task
This guide explains how to include a memo value as part of labor transactions during a stop time operation on the My Schedule page in the Techmobile app.
Procedure
Step 1: Create state at application level to store value from new input field
<state name="labTransMemo" type="string" id="m_vk56k"></state>
Step 2: Add attribute as part of the datasource schema
<maximo-datasource id="woLaborDetaildsOnSchedule" [...]>[...]<attribute name="memo" id="m_a7je9"/><maximo-datasource/>
Step 3: Create input to receive memo value as part of dialog
<dialog id="woConfirmLabTimeOnSchedule" [...]><smart-input id="m_krp2a" label="Memo" on-blur="onMemoBlur" required="true" value="{woLaborDetaildsOnSchedule.item.memo}"/></dialog>
Step 4: Create onBlur handler method to store memo value on application state
// onBlur handler used to store memo valueonMemoBlur(event){// Set value to app statethis.app.state.labTransMemo = event?.target?.value;}
Step 5: (On AppCustomizations.js) Create method to save lab trans item and use it on before-invoke-action lifecycle handler
async saveLabTransMemo() {const ds = this.app.findDatasource("woLaborDetaildsOnSchedule");// insert memo into current labtransds.item.memo = this.app.state.labTransMemo;// save labtrans itemawait ds.save();// clear memo value from statethis.app.state.labTransMemo = null;}
In order to have it working on Work Order Details and Report Work pages the code have to be replicated to their respective dialog and datasource.
Page last updated: 08 July 2025