MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (
-   Getting Started (
-   -   Hard space to color (

Kal January 10th, 2018 08:37 AM

Hard space to color
I understand that this Rule will turn regular spaces to "Hard spaces and will not break.

return ReplaceSubstring(Field("Variable_FIELD1")," "," ")

Now is there a way to turn that hard space to print in color.

Reason is some of our client have custom fonts and their mapping of characters are messy, sometimes I get "question marks in boxes" being printed. Now if I can tell that "Hard space" to print in "White" then I can keep using the client custom fonts.

So I just want to add on to this rule and after it converts to Hard Spaces I then want to change the color. Hope this is clear.

kjacobson January 10th, 2018 10:32 AM

Re: Hard space to color
You can use color tags in your replace string. So instead of just returning the non breaking space, you can return the color tag, then the non breaking space and then return the color to the original color. Make sure you have color swatches in FP named White and replace OriginalColor with the name of your color. Make sure you have "Treat returned strings as tagged text" checked.

return ReplaceSubstring(Field("Variable_FIELD1")," ",'<color name="White">&nbsp;<color name="OriginalColor">');
Not sure if there is a better solution for this, but this should change your text to white.

Kal January 10th, 2018 03:11 PM

Re: Hard space to color
Thanks, that's what I was trying to get at.
This helps.

All times are GMT -7. The time now is 11:33 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.