Hello Team,
On the default query that is present once we login to Maximo Anywhere, is it possible to display an image conditionally based on a field in the Work Order object?
We have a boolean field as SAFE which is of YORN/Boolean type and stores 0 or 1.
We want to display an image as below when SAFE = 1 and nothing if SAFE = 0.
I have added the icon in the image folder and updated the layout xml.
Then in the listItemTemplate I have added below line.
<image id="Safe" image="safe.svg" layoutInsertAt="item6"/>
After I build and deploy I am able to see the icon but it is present on all the Work Orders despite the SAFE field is 0 or 1.
In WOListHandeler.js I have created below method and associated in app.xml in image tag by adding in eventHandlers but still the icon is not appearing based on value of SAFE field.
enableSafeIcon: function(eventContext){
var workOrder = eventContext.getCurrentRecord();
if (workOrder.safe == 0) {
eventContext.setDisplay(false);
return;
}
eventContext.setDisplay(true);
},
Is there any way we can conditionally show this image?
------------------------------
SHASHANK .
------------------------------
#AssetandFacilitiesManagement#Maximo#MaximoAnywhere