BluiSh Posted March 16, 2011 Posted March 16, 2011 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
comment Posted March 16, 2011 Posted March 16, 2011 Do you mean a random integer between 1 and 20 inclusive?
BluiSh Posted March 16, 2011 Author Posted March 16, 2011 Yes Indeed I need a integer number between 1 to 20. Thanks Your help would be very helpful Sincerely BluiSh
comment Posted March 16, 2011 Posted March 16, 2011 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.
BluiSh Posted March 16, 2011 Author Posted March 16, 2011 Thank you very much... Consultant I´m testing it right now!!!!!!! THanks Sincerely BluiSh
Recommended Posts
This topic is 5059 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 accountSign in
Already have an account? Sign in here.
Sign In Now