Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

random numbers in a field. possible?

Featured Replies

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

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

  • Author

fantastic! I have tried it and it works perfectly. Thank you so much.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.