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.

issues with null fields using conditionals (n00b question)

Featured Replies

hi, I'm a few weeks into FM9 and I have a background as a PHP/MySQL developer and I'm finding the code a bit odd.

what I want to do in this context is have a field with three possible outcomes - if it is null one string, 0 another string, and anything >= 1 a final string. the code I'm (unsuccessfully) using is below. right now the only condition that doesn't work is 'Pending'.

thanks for any advice/help!

~~~

Case ( AttendNUM = 0 ; "Decline" ; AttendNUM ≥ 1 ; "Accept" ; "Pending")

Case(AttendNUM = "";one string;AttendNUM = 0;another string;final string)

The above returns one string if the value is null, another string if the value is 0 and final string if the value is anything else

hth

Phil

  • Author

no dice...weird. I'll just figure out a work around.

your choices are either 0, Decline, or any number equal to or greater than 1, what would be the pending, less than 0?

This case statement would work if the number is greater than one

Case ( AttendNUM = 0 ; "Decline" ; AttendNUM = 1; "Accept"; "Pending")

HTH

Lee

I assume anything that has no value in AttenNum is pending:

Case (

not isempty (AttendNUM) and (AttendNUM)=0 ; "Decline" ; AttendNUM ≥ 1 ; "Accept" ; "Pending")

OR USE IT THIS WAY:

Case ( isempty (AttendNUM); "Pending"; AttendNUM ≥ 1 ; "Accept" ; "Decline")

I read the choices as Null, 0, >=1. No mention of non-integers between 0 and 1 and negative numbers.

Case(

IsEmpty(AttendNum); "Decline";

AttendNum = 0; "Pending";

AttendNum >=1; "Accept";

"Error")

  • Author

isempty is what I was looking for. thanks!

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.