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.

if or case, range of numbers

Featured Replies

Hi,

I've let my filemaker go bit rusty and I'm driving myself mad trying to remember how to make a calculation that gives a result based on a range of numbers.

ie.

1-10 =10

11-20 = 20

21-30=30 etc

I've tried case (field >1 <10;10 etc etc i've a feeling that I'm missing something between the >1 and <10???

Thanks in advance,

Skip

Case (

field < 10 ; 10 ;

field < 20 ; 20 ;

field < 30 ; 30 ;

... continue and then if there is a default result

;

999

)

Since vs. 7, calculations short circuit and stop evaluating when they hit the first true. There is also concept of predicting which groups will have the largest numbers of records returned and planning for it.

For instance, if you know that 80% of your records are above 80 but not over 100 then it works best to reverse the theory as:

Case (

field > 100 ; 999 ;

field > 90 ; 90 ;

field > 80 ; 80 ;

... etc.

Taking advantage of branch prediction will speed up evaluations overall.

Edited by Guest
Added explanation

  • Author

Thanks very much.

Actually, you may not need to list out all your options. Consider this as well:

Ceiling ( field / 10 ) * 10

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.