Business Requirement:
As per the business requirement free text field for Observation is added in the Activities and Tasks Page
This is the same observation field in maximo
As per the requirement users will put the value in the observation field in the mobile and the value will be saved in observation field in Maximo also.
Issue:After giving the value in the observation field in Maximo Mobile the value is getting disappeared after clicking on the Check icon
Solution steps:
observation field in the main activities and tasks related data source woPlanTaskDetailds
observation field in the json data source woPlanTaskDetaildsSelected also which is in the Activities And Tasks page
Added the below code to create the input field for observation in the Activities And Tasks page
<box direction="row" children-sizes="100" fill-parent="true" padding-bottom="0.5" fill-child="true" id="k75zx">
<smart-input label="Observation" rows="1" input-kind="LONGALN" value="{item.observation}" theme="dark" id="zgg8_"/>
</box>
I have tried with the below options also for the value field
value=="{ woPlanTaskDetaildsSelected.item.observation}"---Page is not opening
value=="{ woPlanTaskDetailds.item.observation}"---Same value is coming in every observation field after typing value in one observation field
Below custom codes are added in the appcustomization
// new function to inject observation field on event of saving the task data
onSaveTask(evt){
evt.record.observation=evt.datasource.currentItem.observation;
}
// new function to capture events for the woPlanTaskDetailds datasource and call the onSaveTask function
onDatasourceInitialized(ds) {
if (ds.name =="woPlanTaskDetailds")
{ds.on('before-put-data',this.onSaveTask.bind(this));
}
}
For this I tried with the json data source woPlanTaskDetaildsSelected also like below.But it did not work.
onDatasourceInitialized(ds) {
if (ds.name =="woPlanTaskDetaildsSelected")
{ds.on('before-put-data',this.onSaveTask.bind(this));
}
}
The main issue here is as in this page there is no save button so the function for saving the observation field value is not getting called