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.

Range of numbers on a "Case" function

Featured Replies

Guys, I have the following calculaiton:

Case ( Service = "Call" and Type = "International" and Number = "xxxxxxxxxx", 0.30 , etc...

On the xxxxxxxxxx I want to specify a number range, e.g., from 100 to 100000000.

When I do searches I simply enter 100...100000000 because "..." refers to range but in the calculation it won't work.

How should I do it?

This is a price list, right?

  • Author

This is a price list, right?

Yes it is, sort of.

It's not good practice to hard-code prices into calculations, because eventually they will change. You should have a Prices table and lookup the price from there via a relationship.

What do the numbers represent? Are their ranges consecutive?

  • Author

It's not good practice to hard-code prices into calculations, because eventually they will change. You should have a Prices table and lookup the price from there via a relationship.

What do the numbers represent? Are their ranges consecutive?

Hi comment -- I got it on the Prices tables, thank you very much for that suggestion, makes sense, however, for this particular DB is not really necessary. The numbers represent phone numbers (the "xxxxxxx" on my original post). Yes, they are consecutive.

Even so, data belongs in fields, not in formulas.

If you want to use a calculation, you need to make it along the lines of:

Case (

Service = "Call" and Type = "International" and 100 < Number and Number ≤ 100000 ; 0.3 ;

...

)

Since Case() returns the result of the first test that is true, you can test for range boundaries only, for example:

Case (

n < 10 ; "zero to ten" ;

n < 100 ; "eleven to hundred" ;

...

)

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.