Hi Michael,
Scott's method is pretty straightforward, I didn't realize all the permutations that were required.
If you wish to use the formula I suggested you can create 3 publish lines in the generator:
@randrange(1,999)@,@leftpad(@randrange(0,999)@,0,3)@,@leftpad(@randrange(0,999)@,0,3)@.@leftpad(@randrange(0,99)@,0,2)@ $
@randrange(1,999)@,@leftpad(@randrange(0,999)@,0,3)@.@leftpad(@randrange(0,99)@,0,2)@ $
@randrange(1,999)@.@leftpad(@randrange(0,99)@,0,2)@ $
Cheers,
Navin
Original Message:
Sent: 08-06-2019 12:16 PM
From: Michel Laflamme
Subject: Generation Data - Amount
Hi Navin,
With this formula : @randrange(0,999)@,@leftpad(@randrange(0,999)@,0,3)@,@leftpad(@randrange(0,999)@,0,3)@.@leftpad(@randrange(0,99)@,0,2)@ $
I cannot generate this amount 103.82 $ or 23,089.08 $ because 2 comas are always included
Thanks
Original Message:
Sent: 08-06-2019 10:16 AM
From: Navin Chari
Subject: Generation Data - Amount
Use the formula below:
@randrange(0,999)@,@leftpad(@randrange(0,999)@,0,3)@,@leftpad(@randrange(0,999)@,0,3)@.@leftpad(@randrange(0,99)@,0,2)@ $
Original Message:
Sent: 08-05-2019 02:47 PM
From: Michel Laflamme
Subject: Generation Data - Amount
Hi,
I generate synthetic data. I'm looking for a function that allows me to generate a formatted amount like this 999,999,999.99 $.
and aligned to the right
This function doesn't work @string(@randrange(1,99999999999)@,"000,000,000.00 $")@, because it returns this to me :
000,000,103.82 $
010,753,077.71 $
000,023,089,08 $
and I want
103.82 $
10,753,077.71 $
23,089,08 $
Thanks !