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.

As a number ranges from a to b, set from c to d

Featured Replies

I don't really know how to ask the question so I can't find the answer that is surely very obvious.

I have a field that is a number, and as that number goes over 50 and approaches 100 I would like a calculation to return a number that goes from 48 down to 24.

Can you help?

Thank you.

You didn't specify the exact mapping of input to output, but you might be looking for something like this.

Case(

theNumber > 75; 24;

theNumber > 50; 100 - theNumber;

theNumber

)

  • Author

Thanks. Here's a more concrete example:

As Field1 goes from 50 to 100 I would like Field2 to go from 36 to 24.

So when Field 1 is < or = to 50 Field 2 = 36.

When Field1 is between 50 and 100 Field2 is similarly between 36 and 24.

Then when Field 1 is > or = to 100 Field 2 = 24.

It is the middle part where Field2 interpolates along its range in response to Field1 that I can't work out.

field2 =

Case(

field1 ≤ 50; 36;

(field 1 > 50) and (field1 < 100); 48 - field1 * 12 /50;

field1 ≥ 100; 24;

24

)

Note that the field1 ≥ 100 condition is redundant since that's all that is left after the first two, but I included it for readability.

  • Author

Thank you, Tom, I can understand (I think) your calculation, I'll try to make it work.

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.