Skip 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 Number

Featured Replies

I am trying to set a field to pull a random number each time a record is created. I have a field named "Dice" with a calculation

"1" - "100" * Random

And a field named "randam_number" with the calculation

Middle (Dice; Position (Dice; "-"; 1; 1) + 1; Position (Dice; "."; 1; 1)-2)

At first this seams to work just fine. I get numbers like 59, 18, 89 or 7. Buy every once in a wile I get a blank field. Any ideas.

Well,

"1" - "100" * Random

returns a number between 0 and -98.9̅9̅9̅9̅9̅

Then, your calculation returns blank whenever Dice is between 0 and -.9̅9̅9̅9̅9̅ and also when Dice is an integer - roughly, in 1% of the cases.

Why not use simply:

Int ( Random * 99 ) + 1

  • Author

That worked great, thank you.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.