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.

Featured Replies

  • Newbies

I have 4 fields called sibling 1, 2, 3, 4 that contains different languages. I want to create a 5th field to evaluate the 4 language fields and to say "Yes" or "True" they are all the same language, or to say "No" "False" they are not all the same language. 

 

An "IF" calculation works for comparing 2 fields but I can't get it to work for 4 fields. Any ideas?

 

 

This could be done by =

Let (
allLangs = List ( Lang1 ; Lang2 ; Lang3 ; Lang4 )
;
ValueCount ( FilterValues ( allLangs ; Lang1 ) ) = 4
)

This will return 1 (True) if all the LangX fields contain the same value, 0 (False) otherwise. If all four fields are empty, the result will be False, too.

 

 

That said, having numbered ("sibling") fields is usually a symptom of inadequate structure. Why aren't you using related records instead?

Hi Julie, welcome to FMForums!  :-)

 

Follow Comment's direction here ...

 

As an aside for future reference, an If() function only allows two possible values - read up in FM Help about it.  If you want similar calculation which allows more than two values, read up on Case() function.

An "IF" calculation works for comparing 2 fields but I can't get it to work for 4 fields.

an If() function only allows two possible values

 

I believe there are only two possible values here as the result - either true or false. The problem is not with the If() function itself. It's the = operator that will only compare two values at a time. But you could still use the If() function and test for =

 

Lang1 = Lang2 and Lang2 = Lang3 and Lang3 = Lang4

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.