Forum Discussion
Hi Amitosh,
This is an interesting use case. I'd recommend looking at the OOTB form for an Express ECO. There is a field on the form titled "EDR_Status" which is very similar to what you're attempting to do. All manipulation of this field happens during the form's onFormPopulate event "Express Fill EDR Status Field". Specifically, the function "populateEdrStatus" will be helpful.
You should be able to write some javascript which quickly looks at the boolean property, and then assigns the correct image/text to the HTML element you've created.
Tanks,
AJ
I could change the field to HTML,
<img src="../customer/ChangePending.png" style="width: 36px; height: 36px;" name="has_change_pending"></img>
And wrote a method on onFormPopulate to decide to show the image or not
if(top.aras.getItemProperty(document.item, "has_change_pending", "") != "1")
{
hideChangePendingImage(true);
return;
}
hideChangePendingImage(false);
function hideChangePendingImage(hide)
{
var image = document.getElementsByName("has_change_pending")[0];
if(hide)
{
image.style.display = "none";
}
}