Kingsfield Posted October 31, 2008 Share Posted October 31, 2008 Hi, I have a spreadsheet that contains requests for Cat and Dog samples. Can I create a script that highlight the cat samples requests in RED, and the Dog request in Black. Note that both pet types are in both columns. see attached file, Hope this makes sense. Regards Neill http://forums.printable.com/images/smilies/smile.gifWebsite request system 1.csv.1.zip Link to comment Share on other sites More sharing options...
Dan Korn Posted October 31, 2008 Share Posted October 31, 2008 The way to change the color of text is with a <color> tag. Please see the FusionPro Tags Reference Guide for more information. In your case, I think you want to do something like this: var fieldval = NormalizeEntities(Field("Sample 1 For Export")); // "Cat:Duck Adult" var parts = fieldval.split(":"); if (parts.length < 2) return fieldval; var format = ""; if (ToLower(parts[0]) == "cat") format = "<color name=Red>"; return format + parts[1]; Link to comment Share on other sites More sharing options...
Kingsfield Posted November 1, 2008 Author Share Posted November 1, 2008 Perfect result after a few tweeks, great service and many thanks for the support :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.