Conditional formatting based on text input in dropdown box
Hi,
I have the follow boxes to calculate the risk of a work process,

I want to be able to change the background colour of the fields in the R (Risk) fields based on the following conditions:
L = Green
M = Yellow
H = Red
VH = Red
below is the current script I have in the R (Risk) fields
var L = this.getField("LPreparation").valueAsString;
var C = this.getField("CPreparation").valueAsString;
var R = L+C;
if(R=="A1"||R=="B1"||R=="B2"||R=="C2"||R=="D3"||R=="D4"||R=="E3"||R=="E4"||R=="E5")
event.value = "M";
else if(R=="C1"||R=="D1"||R=="D2"||R=="E1"||R=="E2")
event.value = "L";
else if(R=="A2"||R=="A3"||R=="B3"||R=="B4"||R=="C3"||R=="C4"||R=="D5")
event.value = "H";
else if(R=="A4"||R=="A5"||R=="B5"||R=="C5")
event.value = "VH";
else
event.value = "";
Would be grateful if anyone can assist with the conditional formatting
