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.
Juggernaut

if function in calculation field

Featured Replies

Hi, I've got a calculation field that is running the following calculation:

If ( field one = "x" ; field two)

This achieves the desired results. But, I also want to check field one for "y" and return a different result.

I assumed I could add another "If" statement or an "else if" or "else" but can't seem to get this to work. Is there another way to get this done?

Thanks!!

-Wing

How about using the Case function in place of the If

Use Case ( ) Instead

Case ( field one = "x" ; field two;

field one = "y" ; field three

)

Also, keep in mind that the Case () Statement evaluates each test expression in the order it is in and exits the case statement after it hits the first test expression that evaluates as true. So order of evaluation is important.

  • Author

That worked perfect! I wasn't familiar with Case function. Thanks!

-W

I perfer the Case over the If Statement because for me it is easier to read and write:

BTW, the Online Help, under the If Statement, has this Note: If you have more than two possible results, consider using the Case function.

Lee

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.