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.

Featured Replies

I have a database full of backgammon positions.  Each poses a problem with a correct answer and I've set up a nifty layout with a global field for the user to enter his answer, and other fields that reveal commentary on the proper play once the user has entered the proper answer.  I have descriptive fields set up that allow the user to Find problems on various themes that he or she  might want to work on.So far so good!   

Now what I'd like to do is write a script that scrambles the order of the problems, or selects them randomly.  I see that there is a "Random" calculation function that will generate a random number between 0 and 1 . . . but I'm not seeing my way to how to implement this.   I'm guessing maybe I could multiply the Count of records by Random and then maybe multiply the result by 1 or 10 or 100 depending on how many records there are and then use that as the Record Number that gets chosen?

Does this seem like the right approach?  I'm guessing this might be a fun use of Filemaker people have deployed in similar situations to good effect, and I'm guessing there are clever approaches I'm not thinking of.  Suggestions appreciated!

13 minutes ago, Wickerman said:

write a script that scrambles the order of the problems ...

To sort records in random order, define an unstored calculation field (result is Number) =

Random

and sort by this field.

 

13 minutes ago, Wickerman said:

... or selects them randomly.

To go to a random record from the current found set, do:

Go to Record/Request/Page [ No dialog; Int (Random * Get ( FoundCount ) ) + 1 ]

 

  • Author

Thanks very much!  Very simple approach.

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.