Jump to content

Colour Rule


Recommended Posts

Hi Again,


I have to assign colour to 3 more variables, the current script works fine for 2 variables in the column, however we need to add 3 more variables.

if (ToLower(parts[0]) == "kitten")

format = "<color name=Blue>"+"Kitten:";


if (ToLower(parts[0]) == "Puppy")

format = "<color name=Green>"+"Puppy:";


if (ToLower(parts[0]) == "ferret")

format = "<color name=Black>"+"Ferret:";


Please see the script below that works for the 2 variables.

I need help :confused: :confused:


var fieldval = NormalizeEntities(Field("Sample 1 For Export"));

var parts = fieldval.split(":");

if (parts.length < 2)

return fieldval;


var format = "";

if (ToLower(parts[0]) == "cat")

format = "<color name=Red>"+"Cat:";


format = "<color name=Black>"+"Dog:";


return format + parts[1];

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...