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.

How to use 3 If function in a row?

Featured Replies

I know this format below is incorrect, but it gives the idea of what I am after:

If(field1>0 & field2>0, "Yes") or

If(field1>0 & field2<1, "No") or

If(field1<0, "Empty", "")

It looks like it would work correctly, but doesn't. Does it make sense what I am trying to do?

LR

What you need is a case statement.

Case(field1>0 & field2>0, "Yes",

field1>0 & field2<1, "No",

field1<0, "Empty", "")

It allows multiple choices within a calculation. And it is easier to read.

HTH

Watch those ampersands. It should read:

code:


Case ( field1 > 0 and field2 > 0, "Yes",

field1 > 0 and field2 < 1, "No",

field1 < 0, "Empty" )

Note that the trailing "" (blank) is not required in a Case[] statement.

The "&" symbol is used to concatenate text strings. The "or" you had in your original calc also has a specific logical function.

Fitch. My Bad .

Wasn't focusing properly back then. Thanks for correcting for me.

You can nest a series of IF statements - but CASE is better. Using nested IFs, it would look like:

code:


If(field1>0 and field2>0, "Yes", If(field1>0 and field2<1, "No", If(field1<0, "Empty", "")))

Russ

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.