dml1280 Posted March 8, 2019 Share Posted March 8, 2019 (edited) I have already figured out that some fonts won't display the "&" when using "ToUpper". So when I have the issue I use <uppercase></uppercase>. It works when composing the file, but this time it's changing the "&" into the HTML value when used in MarcomCentral. What should I adjust? Here is my rule: if (Field("Title Line 1") == "") return ""; else return '<uppercase>'+Field("Title Line 1")+'</uppercase>'; Here is a link to the screenshot of the output in Marcom Link to Screenshot Edited March 8, 2019 by dml1280 Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted March 8, 2019 Share Posted March 8, 2019 So first, questions like this which are specific to MarcomCentral should really go in the MarcomCentral sub-forum. Anyway, this is a frequently-asked question. The reason for the ampersand difference is because MarcomCentral generates tagged markup data files, where the ampersand is a control character denoting an entity, while most FusionPro jobs in Creator (Acrobat) use flat-file data, where an ampersand has no special function. Fortunately, FusionPro has a TaggedDataField function designed to handle this properly in both types of data. This rule should do what you want, in both local Creator compositions and in online MarcomCentral compositions: return '<uppercase>' + TaggedDataField("Title Line 1") + '</uppercase>'; Quote Link to comment Share on other sites More sharing options...
dml1280 Posted March 8, 2019 Author Share Posted March 8, 2019 Thank you, that worked like a charm! Quote Link to comment Share on other sites More sharing options...
gdellaiera Posted April 9, 2019 Share Posted April 9, 2019 I too am having the exact same issue (only in WebCRD). But when I check the box for tagged text I get the & & if its unchecked I get the entire line of code above (I thought it would work -_-). If I use the preloaded XML rule for all CAPS, it blanks out the '&' completely. I've also tried the below code (from another post) function NoBreak(s) { return s.replace(/&/g,'&').replace(/ /g, " "); } return NoBreak(TaggedDataField(“Department”)); Am I going crazy here? Thanks for the look Quote Link to comment Share on other sites More sharing options...
dml1280 Posted December 3, 2019 Author Share Posted December 3, 2019 This fix worked in FusionPro. I am not familiar with WebCRD...sorry. return '<uppercase>' + TaggedDataField("Title Line 1") + '</uppercase>'; Quote Link to comment Share on other sites More sharing options...
jwhittaker Posted December 9, 2019 Share Posted December 9, 2019 I don't know WebCRD but you might need to convert the uppercase & to lowercase & if (Field("Title Line 1") == "") return ""; else return ReplaceSubstring(('<uppercase>'+Field("Title Line 1")+'</uppercase>'), "&", "&"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.