Jump to content

Using Format Text (color) when using a rule


Recommended Posts

I am using the phone format rule, and the phone number is a field I have set up on manager to have a font color choice using the Format Text functionality. Because the phone field is contained in a rule, I get the following:

<color name="Orange_PMS 1665"

instead of the phone number in the chosen color.

 

Is there a way to use the format text with a rule?

Link to comment
Share on other sites

I am using the phone format rule, and the phone number is a field I have set up on manager to have a font color choice using the Format Text functionality. Because the phone field is contained in a rule, I get the following:

<color name="Orange_PMS 1665"

instead of the phone number in the chosen color.

This isn't really specific to MarcomCentral. You could reference another rule from the Phone Format rule in FP Desktop as well.

Is there a way to use the format text with a rule?

Yes, although the problem here isn't so much that the value you're converting in the Change phone format Rule comes from a rule instead of from a data field; rather, it's that the value contains something (formatting tags) besides just a simple phone number.

 

What you want to do is rearrange the order that the two rules are acting on the raw phone number value, so that you first do the format conversion, and then add the color tags. So I would change your other rule to do something like this:

return '<color name="Orange_PMS 1665">' + Rule("Change phone format Rule");

Where the Change phone format Rule is working with a field or rule value which contains just the phone number.

Link to comment
Share on other sites

Hi Dan -

 

I thought this was MarcumCentral specific because the issue appears to be on the manager using "Format Text" to choose font colors from my loaded color library. My rule works fine on fusion pro to format the phone number, but when I upload and test my template, the phone format doesn't not work, as if the rule is not there. If I don't use "Format Text" to choose color, the phone formatting works.

 

I need to have the end user be able to choose font color online, as it can change based on the background image used.

Link to comment
Share on other sites

Sorry, I was confused by, "when using a rule." To FusionPro, the phone number is not actually coming from a rule. MarcomCentral is presenting the phone number with the color tagging to FusionPro as a data field in the input file its generating, not as a rule. So it seems that the phone format rule needs to be modified to take that tagging into account, since it's assuming that the data field it's acting upon contains only the phone number itself without any other markup. In this case, the numbers in the color name are particularly confusing to the phone number formatting rule, since it has trouble distinguishing between the markup tag attributes and the actual text contents (the phone number itself).

 

(In a way, this is specific to MCC, because you're not including any markup in the data field in your input file in FP Desktop. However, you can reproduce this issue in FP Desktop by putting the color tagging markup into the data field in your input file. That's actually the way I need to set things up to fix this, with the data containing the markup so I can see it in the Rule Editor dialog in FP Desktop.)

 

I'll need some time to rework the Regular Expression logic in the phone number formatting rule to remove the assumption that there is no tagging or other content in the data field it's working with besides the actual phone number.

 

Other than that, I may have to defer to the MCC team on this, as they may have some other ideas about how to first do the phone number formatting conversion, then add the markup tags to change the color. Feel free to contact your CPM or Support as well.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...