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.

Case Calc based on Check box

Featured Replies

Hi,

I've got a field (CardWallCert) with a check box which is fed by a value list with entries "Wallet Card" and "Wall Certificate".

It describes which are applicable for a given course (there are a number of possible variants ) and every option is potentially possible (Either one, or the other, or both, or neither)

I'm trying to textually describe the contents of the check box (and hence the course variant) via a calculation:

eg:

Case ( IsEmpty ( CardWallCert ) ; "NO card/cert, " ; CardWallCert = "Wallet Card" and CardWallCert = "Wall Certificate" ; "" ; CardWallCert ≠ "Wallet Card" ; "NO card, " ; CardWallCert ≠ "Wall Certificate" ; "NO cert, " ; "" )

I want it to return blank if both WalletCard and WallCert are selected, but it just gives whatever relates to the last option I selected/deselected.

No doubt someone with a stronger logic brain than mine can get the desired results, perhaps even with a more concise calc. I'm trying to avoid splitting into two fields (WalletcardYN and WallCertYN)

Thanx in advance for any help

How about =

Case (

IsEmpty ( CardWallCert ) ; "NO card/cert, " ;

CardWallCert = "Wall Certificate" ; "NO card, " ;

CardWallCert = "Wallet Card" ; "NO cert, "

)

  • Author

Thanks,

My bad, mistake in my original post, what I'm after is when:

CardWallCert = "Wallet Card" and CardWallCert = "Wall Certificate",

I want it to return "CARD or CERT"

Which is the bit I can't get:

Case (

IsEmpty ( CardWallCert ) ; "NO card/cert, " ;

CardWallCert = "Wallet Card" and CardWallCert = "Wall Certificate" ; "CARD or CERT" ;

CardWallCert = "Wall Certificate" ; "NO card, ";

CardWallCert = "Wallet Card" ; "NO cert, "

)

No joy if both are checked

even if i try:

Case (

IsEmpty ( CardWallCert ) ; "NO card/cert, " ;

CardWallCert = "Wallet Card" and "Wall Certificate" ; "CARD or CERT" ;

CardWallCert = "Wall Certificate" ; "NO card, ";

CardWallCert = "Wallet Card" ; "NO cert, "

)

Same deal - when both values are marked I get nothing returned, instead of "CARD OR CERT"

{BTW - I didn't realize you could drop the default result from a Case statement, that's cool. I case it assumes: Return NULL?}

You may have a contradiction in your terms. I would think that "No Card" implies the existence of a certificate, and conversely "No Cert." implies the existence of a card. Both of these situations, therefore, can also be described as "CARD or CERT" (meaning "Either Card OR Cart, but not both") and you need to decide which labels you want to apply.

Note also that:

CardWallCert = "Wallet Card" and CardWallCert = "Wall Certificate"

can only be true when "Wallet Card" = "Wall Certificate", which is never.

  • Author

Thanks for your help on this, but I'm not sure I'm with you:

Some courses require a Wallet card be issued (and not a Cert- "NO cert"), some courses require a Wall Certificate be used (and not a Card- "NO card).

Some don't care and either a Wall Cert or a Wallet Card may be issued (CARD or CERT)

Some courses don't allow for anything to be issued (NO card/cert)

So I have four potential results from the state of my two value check box: one value, the other, neither or both.

Sounds like I'm way better off with two fields: CertY/N and CardY/N

Thanks again

So I have four potential results from the state of my two value check box: one value, the other, neither or both.

That's true. I thought you wanted five possible results out of four possible states, but it turns out you merely want a non-empty default result =

Case (

IsEmpty ( CardWallCert ) ; "NO card/cert" ;

CardWallCert = "Wall Certificate" ; "NO card" ;

CardWallCert = "Wallet Card" ; "NO cert" ;

"CARD or CERT"

)

  • Author

Many thanks, that works on a nice clean example file but not in my solution (I'm also calculating other variant attributes in my result string ) so my issue must lie elsewhere.

Thanks again for your help.

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.