I am trying to build a project portfolio model driven app. In the list of Active projects I would like a status icon next to the Overall status of the project.

I have tried to follow these instructions.
Since I am not a programmer I have a hard time to understand how to customize the javascript properly to suit my needs. I have uploaded the images as web resources and put in the javascript as an own web resource. I have a option field called Overall status in the Project entity that holds the different statuses: On plan, At risk and Critical. I am not sure on how to correctly reference this entity / field in the javascript and I suspect that is why I am getting an error message when trying to modify the View.

Here is the javascript:
function displayIconTooltip(rowData, userLCID) {
var str = JSON.parse(rowData);
var coldata = str_overallstatus_Value;
var imgName = "";
var tooltip = "";
switch (parseInt(coldata,10)) {
case 1:
imgName = "onplan";
switch (userLCID) {
case 1036:
tooltip = "The initative is on plan";
break;
default:
tooltip = "The initative is on plan";
break;
}
break;
case 2:
imgName = "atrisk";
switch (userLCID) {
case 1036:
tooltip = "The initative is at risk";
break;
default:
tooltip = "The initative is at risk";
break;
}
break;
case 3:
imgName = "critical";
switch (userLCID) {
case 1036:
tooltip = "The initative is in critical state";
break;
default:
tooltip = "The initative is in critical state";
break;
}
break;
default:
imgName = "";
tooltip = "";
break;
}
var resultarray = [imgName, tooltip];
return resultarray;
}
I don't know of any way to get any more specific error message on what is going wrong. Any help is greatly appreciated.