NPN Posted January 16, 2012 Share Posted January 16, 2012 Hi, This is probably real simple, I've tried different code snippets from the forums, but can't get it working. I have a rule that formats a phone number, it also adds an "|" in front of the number. I need to change the font color of only the "|" to grey(a color I have defined) and leave the rest(or keep it black). Here's the code I use: var phone = ReplaceSubstring(Field("Direct"), " ", "") if (phone=="") { return ""; } if (phone.length < 8) { return phone; } var lengde = phone.length-7; var phone8 = Mid(phone,lengde,8); switch (phone) { default: var p1 = Mid(phone8, 1, 2) var p2 = Mid(phone8, 3, 2) var p3 = Mid(phone8, 5, 2) var p4 = Mid(phone8, 7, 2) return "| Direct " + p1 + " " + p2 + " " + p3 + " " + p4 ; } Link to comment Share on other sites More sharing options...
NPN Posted January 16, 2012 Author Share Posted January 16, 2012 I figured it out ... "<color name=light_grey>|</color>" within the return string worked like a charm. I'll leave the post so others may find it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.