Hello,
I want to show icons on my grid. What I am looking for is to show light bulb icons on my Urgency column (it would display red, green, or yellow bulbs depending on the level of urgency: 1,2,3,or 4.)
I created the web resources in my default solution (where the entity lies); added in the images, and added the script. My script is written below.
function displayIconTooltip(rowValue) {
var row = JSON.parse(rowValue);
var urgency = row.new_urgency_Value;
var resultarray = null;
var imgName = "";
var tooltip = "";
switch (urgency) {
case 1:
imgName = "new_RedBulb";
tooltip = "1 (Move to Top)";
break;
case 2:
imgName = "new_YellowBulb";
tooltip = "2 (Next Up)";
break;
case 3:
imgName = "new_GreenBulb";
tooltip = "3 (Low)";
break;
case 4:
imgName = "new_GreenBulb";
tooltip = "4 (Backlog)";
break;
default:
imgName = "";
tooltip = "";
break;
}
var resultarray = [imgName, tooltip];
return resultarray;
}
Yet when I add it to column properties and run it, nothing happens. Can someone troubleshoot this for me please. The urgency field is an option set.
Thank you.