Jump to content

How to Random?


This topic is 4346 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello People!

It´s good to be back to the forum :)

I was looking around to see how can I random numbers from 1 to 20 in some fields and follow the classic random * ((maxnumber - minnumber)+1) and for sure I got the result the only problems is that I got a 0 (zero) and only need from 1 to 20 and for my surprise the formula is not giving me a 20 neither!!!!!!!

How can I resolve this problem, maybe It must be very basic maths but.... any help would be very helpful

Byeeee

Sincerely

BluiSh

Link to comment
Share on other sites

Try +

Int ( Random * 20 ) + 1

Note that the exact behavior of the Random function in some versions is not entirely clear. FileMaker,Inc. have posted various conflicting descriptions of the function regarding the possibility of Random returning either 0 or 1. This was fixed in the 10.0v3 update. In previous versions, there may be a VERY small probability of the calculation above returning 21.

Link to comment
Share on other sites

This topic is 4346 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.