This is exactly what I'm attempting to do. I'm using the text rule and have inserted it into the text editor dialog box but it is returning the literal text of the rule. I'm missing one small step I believe here. I've created four new colors named, Spot Red, Spot Green, Spot Blue, and Spot gray. Here's what I've got so far:
if (Field("Background").indexOf("BLUE") > -1)
return '<span color="Spot Blue">';
if (Field("Background").indexOf("GREEN") > -1)
return '<span color="Spot Green">';
if (Field("Background").indexOf("RED") > -1)
return '<span color="Spot Red">';
if (Field("Background").indexOf("GRAY") > -1)
return '<span color="Spot Gray">';
//else
return "";
Its functioning but its returning the literal text in the text box - for example:
<span color="Spot Gray">
or
<span color="Spot Red">
What am I missing here guys? Thanks in advance.