Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 2nd, 2022, 06:33 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 44
Default Currency to Padded Number

I'm needing a rule to convert currency values to a 11 digit padded number. Examples are:


$265.39 to 00000026539
$43.90 to 00000004390
$765.00 to 00000076500


I thought the padded number rule would work but apparently with the $ sign and (.) in the data, it's not.


Any ideas?
Reply With Quote
  #2  
Old November 2nd, 2022, 10:11 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 236
Default Re: Currency to Padded Number

You can use regular expressions to replace anything that's not a 0-9 with a blank. Your rule would look something like this:

return FormatNumber("00000000000", Field("Currency").replace(/[^0-9]/g, "") );
Reply With Quote
Reply

Tags
currency, padded number

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.