Hi,
On Monday, 10. March 2008, sebb wrote:
> On 10/03/2008, Tom Fernandes <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > On Monday, 10. March 2008, Steve Miller wrote:
> > > Tom,
> > >
> > > If you don't want to use an int as an approximation, maybe you can
> > > find some way to use the __Random to generate a pseudo-random number
> > > in a large range, e.g. 0-1,000,000, then test the random number for
> > > the percentage that you want. E.g. in pseudocode
> > >
> > > if ($__Random(1,1000000) < (1,000,000*0.83274/100)) ...
> >
> > okay this seems to work for me (it took me a bit to get it).
> >
> > I'm now having ${__Random(1,1000000,NUM)} in a variable but each thread
> > will get executed with the same number returned from the function - how
> > can I change that behavior?
>
> Where are you definining the variable/referencing the function?
It works now. I actually have a user defined variable field.
Name: dummy_1; value: ${__Random(1,1000000,NUM_1)}
I tried to use ${dummy_1} to reference to the number which always gave me the
same number in a thread. Now that I use ${NUM} it works.
It would be sufficient for me to have one var for the random number, but if I
access $NUM_1 again later in the next if-controller it will use the same
number like before. that's why I'm having name-value-pairs like
Name: dummy_2; value: ${__Random(1,1000000,NUM_2)}
Name: dummy_3; value: ${__Random(1,1000000,NUM_3)}
now. It works - but for cosmetic reason - isn't there a better way?
I actually tried to create the random number directly in the if-controller
using JS - but that didn't work.
thanks so far again,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]