strido Posted November 18, 2013 Share Posted November 18, 2013 Good afternoon - I require two rules to be applied to only one field. Field is "Title". One rule I have forces it to UPPER CASE. The 2nd Rule I have changes a "2" to a SuperScript "2". How do I combine those two rules to force it to output the "Title" field with both rules applied? Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted November 18, 2013 Share Posted November 18, 2013 Do you have a sample as to what the data for the "Title" field looks like? Quote Link to comment Share on other sites More sharing options...
strido Posted November 18, 2013 Author Share Posted November 18, 2013 President, AA2 Corporation should read PRESIDENT, AA<sup>2</sup> CORPORATION (No "return tagged text" option on the forum!) Quote Link to comment Share on other sites More sharing options...
esmith Posted November 18, 2013 Share Posted November 18, 2013 If the second rule is only for a specific case (superscripting a '2'), you could just use a basic replace() after converting the value to uppercase: return ToUpper(Field("Title")).replace("AA2","AA<superscript>2</superscript>"); If you wanted to superscript any digit(s), you would use a regular expression like so: return ToUpper(Field("Title")).replace(/(\d+)/g,"<superscript>$1</superscript>"); Quote Link to comment Share on other sites More sharing options...
strido Posted November 18, 2013 Author Share Posted November 18, 2013 Hey! That worked! Thanks guys! 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.