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.

Selecting Records At Random

Featured Replies

I have a table that contains 397 assessment questions and answers. Is there a way of pulling out a predetermined number of records at random? Would the random function be appropriate here?

I would define an unstored calculation field (result is Number) = Random.

To get N random records, show all records, sort by the calculation field, go to record number N+1 and omit multiple records [Get (FoundCount) - N].

  • Author

I would define an unstored calculation field (result is Number) = Random.

Thanks for the reply comment. So the first step for 40 records as an example would be (40)= Random? I suspect not because this returns a value of zero across all records.

No, the first step would be to define a calculation field. Enter =

Random

as the formula, set the result type to Number, and storage options to 'Do not store…'

  • Author

go to record number N+1 and

Sorted the random calculation. If N = 40, what's the best way to go to the 41st record now that they are in random order?

omit multiple records [Get (FoundCount) - N].

Do I use the Get(FoundCount) - N in the specify box of Omit All Records script step?

what's the best way to go to the 41st record

Use the Go to Record/Request/Page[] script step.

Do I use the Get(FoundCount) - N in the specify box of Omit All Records script step?

Yes.

  • Author

Works a treat, thank you very much!

I was expecting it to pull the same 40 records out every time I run the script but I'm delighted that it doesn't. That can only mean that the random value must be changing in each record, at what point does it do that?

Unstored calculation fields are evaluated "as needed". When you call for records to be sorted by the field, that's when it's needed.

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.