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 portal record

Featured Replies

I am creating a cdml solution that requires a random image.

I have a list of theatres with related movies. When I list the theatres I want one random movie image to show beside the name.

give your movie images a serial number starting at 1, step 1

for the key in the main db use an unstored calculation

int(RANDOM * count(MOVIEIMG::ID))

  • Author

That works great, but it can result a zero. Can that be avoided?

How about:

(int(Random * (count(MovieImg::ID) - .5)) + .5

  • Author

that does not seem to work. A bracket it missing but I have tried different combinations and zero still appears.

Whay not use an In-Line Action with the -FindAny tag?

Wups -- I added an open parenthesis at the beginning.

But there may be a problem using the "Int" function. Try this:

Round((Random * (count(MovieImg::ID) - .5)) + .5, 0)

  • Author

That was it thanks 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.