juanito2004 Posted September 27, 2004 Share Posted September 27, 2004 I am still a filemaker beginner. This is my first post so I hope this question is in the right place. My question is: Let's say I have 4000 records in a database. Is there a way to automatically fill one of the fields for all records with numbers that are chosen randomly and that have a specific range (for example 1 as minimum and 500 as maximum)? some kind of formula maybe? Any help is much appreciated Link to comment Share on other sites More sharing options...
LiveOak Posted September 27, 2004 Share Posted September 27, 2004 FileMaker has a random number function that returns a number between 0 and 1. This function can be used to set a number field to a random number using either a looping script and the SetField statement or a replace "Replace" either executed manually or in a script. If you want a number withing a certain range this can be done with a calculation. For instance, an integer between 1 and 500 can be set using: (Random * 499) + 1 <-- this won't return an integer Int((Random * 499) + 1) <-- this will return an integer -bd Link to comment Share on other sites More sharing options...
juanito2004 Posted September 27, 2004 Author Share Posted September 27, 2004 fantastic! I have tried it and it works perfectly. Thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7286 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