rpaterick Posted August 23, 2011 Share Posted August 23, 2011 Here is sample data. 79 82 125 146.95 I need the decimal and 2 characters/numbers after it to be super scripted. Any easy way to do this? I have a work around but it's a pain. Thanks! Link to comment Share on other sites More sharing options...
Dan Korn Posted August 23, 2011 Share Posted August 23, 2011 return Field("price").replace(/(\.\d{2})$/, '<superscript>$&<superscript>'); Link to comment Share on other sites More sharing options...
rpaterick Posted August 23, 2011 Author Share Posted August 23, 2011 Thank You Dan, that worked of course. I forgot to mention in my posting that the customer only provides me with 2 characters on some records and also expects it to have ".00" superscripted after also. So the following would have ".00" after each one except the last one. 79 82 125 146.95 Is there a way to achieve this also? Thanks Dan! Link to comment Share on other sites More sharing options...
Dan Korn Posted August 23, 2011 Share Posted August 23, 2011 return FormatNumber("0.00", Field("price")).replace(/(\.\d{2})$/, '<superscript>$&<superscript>'); Link to comment Share on other sites More sharing options...
rpaterick Posted August 23, 2011 Author Share Posted August 23, 2011 return FormatNumber("0.00", Field("price")).replace(/(\.\d{2})$/, '<superscript>$&<superscript>'); That saved a lot of time! Thanks again Dan. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.