I also tried creating a Javascript Query and calling it from the 'background color' of a table cell with getEventColor({{ currentRow.EventTypeId }}). Doesn't work either.
function getEventColor(eventTypeId) {
if (eventTypeId== null) { return; }
else if (eventTypeId== 3) { return "#F8F8F8CC"; }
else if (eventTypeId== 12) { return "#008000CC"; }
else { return; }
}
Looks like there's just a typo when you declared the function on window (which you fixed in subsequent definitions but then weren't declaring on window anymore). Try this?