traba5058 Posted November 29, 2017 Share Posted November 29, 2017 Good Morning! I have a javascript rule to replace the above characters & superscript them. var s = Field("Name"); return s.replace(/(™|®|©)/g,'<superscript>$1</superscript>'); It is not working. Will you let me know how the marks should be entered in the database? Thanks, Traba Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 29, 2017 Share Posted November 29, 2017 Please be more specific than "It is not working." What does your data look like? If it already has the symbols in it, then you can look for those directly: return Field("Name").replace(/(™|®|©)/g,'<superscript>$1</superscript>'); Though the trademark symbol is usually already superscripted in most fonts, so really just this: return Field("Name").replace(/(®|©)/g,'<superscript>$1</superscript>'); If it's a job that will be run in MarcomCentral or a similar system, where it may use flat-file (delimited) text data for local compositions but tagged markup data for online compositions, you can do this: return TaggedDataField("Name").replace(/(®|©)/g,'<superscript>$1</superscript>'); Make sure to check the "Treat returned strings as tagged text" box. 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.