Hello Guys,
I'm facing the current problem:
I want change a colour cell depends on the value of the cell variable. I'm using the following JavaScript code on the initialize event of this cell
data.First.MainTable.Table1.Row1.Cell6::initialize - (JavaScript, client)
var numrows = xfa.resolveNodes("data.First.MainTable.Table1.Row1[*]").length;
for (var i = 0; i < numrows; i++)
{
var LV_DATA = xfa.resolveNode("data.First.MainTable.Table1.Row1[" + i + "].Cell6");
switch(LV_DATA){
case LV_DATA <= "2":
this.border.fill.color.value = "0, 153, 0";
break;
case LV_DATA >= "3" && LV_DATA <= "6":
this.border.fill.color.value = "255, 255, 0";
break;
case LV_DATA> "6":
this.border.fill.color.value = "255, 0, 0";
break;
default:
this.border.fill.color.value = "255, 255, 255";
}
}
![Print1.PNG Print1.PNG](/t5/image/serverpage/image-id/5331i7BB41969884F7627/image-size/large?v=v2&px=999)
My output values is:
![Print2.PNG Print2.PNG](/t5/image/serverpage/image-id/5332i13F23C6A63F08B83/image-size/large?v=v2&px=999)
With this output on column RISK Level I should get the first two cells red and the last one yellow.
Can you help me?