fmisaw Posted January 29, 2008 Posted January 29, 2008 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")
Inky Phil Posted January 29, 2008 Posted January 29, 2008 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
fmisaw Posted January 29, 2008 Author Posted January 29, 2008 no dice...weird. I'll just figure out a work around.
Lee Smith Posted January 29, 2008 Posted January 29, 2008 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
Breezer Posted January 29, 2008 Posted January 29, 2008 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")
David Jondreau Posted January 29, 2008 Posted January 29, 2008 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")
fmisaw Posted January 29, 2008 Author Posted January 29, 2008 isempty is what I was looking for. thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now