In regards to SAVE, I tried to use the AUTO-SAVE tag with maximo-datasource but did not workout for me.
<maximo-datasource controller="" notify-when-parent-loads="false" cache-expiry-ms="1" id="gtassetlabelDS" relationship="gtmassetlabel" depends-on="woDetailResource" selection-mode="none" auto-save="true">
<schema id="rb8aj">
<attribute name="iscalibration" id="j97jw"/>
<attribute name="siteid" id="y96v3"/>
<attribute name="assetnum" id="aa_6v"/>
</schema>
</maximo-datasource>
>>gtmassetlabel relationship is defined in workorder table with ASSET Object (assetnum=:assetnum and siteid=:siteid)
Now I defined below smart input to showcase the field in workorder details page under Asset and Location section.
<smart-input label="ISCALIBRATION" value="{gtassetlabelDS.item.iscalibration}" id="yzqab"/>
Above field shows in the preview mode.
now when I try to change the value in the preview mode for the ISCALIBRATION (YORN) field, it gives an error message as "oslc#update_on_createuri
Could you please advise what is wrong here?
Original Message:
Sent: Tue October 31, 2023 11:54 AM
From: Steven Shull
Subject: Maximo Mobile: Make changes to an existing Controller Class
I'm not understanding how you're seeing the requests that you're seeing here. EventEmitter, Controllable, Button, etc. are core parts of our graphite framework and shouldn't be making network requests to them (they're part of the graphite framework that is bundled in the app). Are you using developer tools on the configuration utility (the thing running on localhost:3001) instead of the preview (the web app running on 3006)? If it failed to build, docker logs or the console output in developer tools is going to be the most useful. That's where we'll log exceptions we encounter generating the react website. If you're seeing issues in the web application, you need to make sure you open developer tools on the window that is running on 3006 to get the JavaScript errors in the console output as that is typically the most useful.
Are you accessing the docker configuration utility outside of your local system? IE using a URL like http://servername:3001/ instead of http://localhost:3001? I know there were some issues when things weren't running on your local machine that we were making updates to address.
I'd probably open a support case so someone from the product team can screenshare and review the logs to understand your specific situation.
------------------------------
Steven Shull
Original Message:
Sent: Tue October 31, 2023 11:13 AM
From: karishma patil
Subject: Maximo Mobile: Make changes to an existing Controller Class
Hi Steven,
Thank you for the response.
As suggested , added my attribute in existing datasource woDetailsReportWork
<attribute name="woeq10" unique-id="true" id="rnsxdv"/>
post which created a button and added on-clock method and arguments as below
<smart-input label="WOEQ10" show-verbose="true" value="{woDetailsReportWork.item.woeq10}" />
<button icon="carbon:checkmark--outline" on-click="detailSave"
on-click-arg="{{'item':woDetailsReportWork.item,'datasource':'woDetailsReportWork'}}" kind="primary"/>
and created method in appCustomization.js
Even post that I am unable to save data I am getting below errors in network
Thank you for assistance in advance
------------------------------
karishma patil
Original Message:
Sent: Tue October 31, 2023 08:15 AM
From: Steven Shull
Subject: Maximo Mobile: Make changes to an existing Controller Class
Assuming your new field is on the WO record itself (not a separate child object), you can add it to the woDetailsReportWork datasource and display it on the page. Then if you add a button (assuming you have an on-click-arg="{{'item':woDetailsReportWork.item,'datasource':'woDetailsReportWork'}}", in the JavaScript method you declare, you can call the save event on the datasource. Something like below.
Just be aware that save events like below are not restricted to the field you want to save. If other changes have happened to the datasource that are not yet committed, they will be saved as well. I think on this page you'll be fine since all the dialogs have you save but if that changes in the future, it is something worth being aware of.
async detailSave(event)
{
let item=event.item;
let datasource=event.datasource;
// Any other custom logic here
await datasource.save();
}
------------------------------
Steven Shull
Original Message:
Sent: Mon October 30, 2023 11:19 PM
From: Chinmaya Kore
Subject: Maximo Mobile: Make changes to an existing Controller Class
Is there a way to call custom save explicitly on a page. I need to add a new section with a custom field on the report work page ,but there is no OOB save button,we just have complete work and there is save for each section seperately.

Thanks,
Chinmaya Kore.
------------------------------
Chinmaya Kore
Original Message:
Sent: Thu October 26, 2023 09:52 AM
From: Steven Shull
Subject: Maximo Mobile: Make changes to an existing Controller Class
That being said, you can look at alternative approaches. Up until 8.11 for instance we didn't even use a computed-function to display the data. Our data-list used adaptive-columns and displayed it field by field. You could add another adaptive column to display additional information.
You could also literally concatenate on to the two attributes using JavaScript. IE modify:
<label label="{item.computedRelatedRecordDesc}" override-required="true" id="gek7p"/>
To something like:
<label label="{item.computedRelatedRecordDesc+' '+item.myotherfield }" override-required="true" id="gek7p"/>
If you have complex logic that you need to evaluate, you could define a local attribute (<attribute name="myCustomField" local="true"/>) and then populate it on a JavaScript event such as onAfterLoadData(dataSource,items). This event fires for every dataSource so you would want to check the datasource like:
if(dataSource && dataSource.name==="relatedWorkOrderDs")
------------------------------
Steven Shull
Original Message:
Sent: Wed October 25, 2023 07:02 PM
From: Chinmaya Kore
Subject: Maximo Mobile: Make changes to an existing Controller Class
Hi All,
Can someone help me understand how to modify an existing function in the Controller.js file.
I am trying to modify the ComputedRelatedRecordDesc function as I also want to display the relatetype along with the relatedreckey and the relatedrecwodescription. Since I shouldn't be modifying the existing controller file, should this function be called in the appcustomization.js file?
Thank you in advance!


------------------------------
Chinmaya Kore
------------------------------