Why not use four calls to Random to build your string? Pardon my
incorrect syntax:
Random(0,9,d1); Random(0,9,d2); Random(0,9,d3), Random(0,9,d4)
Prefix = "555"
Then combine it together as a string: number="$prefix$d1$d2$d3$d4"
If you could get at the String formatting functions, you could do
something like String.format("%04d", randomNumber);
On Wed, Jan 7, 2009 at 8:50 AM, indireddysankar
<[email protected]> wrote:
> Ya, That solves the purpose currently..Thanq...
> If i need numbers below 1000 what can i do...?
>
> On 1/7/09, Piller Sébastien <[email protected]> wrote:
>> Why not starting from 1000 to 9999? Are the values under 1000 really needed?
>>
>> indireddysankar a écrit :
>>> Hi,
>>> To test my application , i need to send mobile Numbers as
>>> 988696[any four digit numbers ]
>>> if i use _Random function for generating FOUR digit random numbers as
>>> ${__Random(0001,9999,userNumber)} ,it is generating numbers starting
>>> from 0 to 9999
>>> ex: 12,453,5539,8,74,...i need to generate only four digit numbers but
>>> not all numbers in the range.
>>> please help me in this regard...
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>