Dec 19, 2006 #1 Joe1010 Programmer Dec 11, 2006 49 US This is very simple but I do not know it. What is wrong with the if statement below? if ({tableOne.fieldOne}) = "Y" then "Y" else "n" Thanks
This is very simple but I do not know it. What is wrong with the if statement below? if ({tableOne.fieldOne}) = "Y" then "Y" else "n" Thanks
Dec 19, 2006 #2 RobbieB Technical User Apr 25, 2003 215 US Try taking out the () so it looks like this. if {tableOne.fieldOne} = "Y" then "Y" else "n Upvote 0 Downvote
Dec 19, 2006 Thread starter #3 Joe1010 Programmer Dec 11, 2006 49 US It returns Y if fieldOne = Y However, if it is blank, it returns nothing. The () did not make any change. Thanks Upvote 0 Downvote
It returns Y if fieldOne = Y However, if it is blank, it returns nothing. The () did not make any change. Thanks
Dec 19, 2006 #4 synapsevampire Programmer Mar 23, 2002 20,180 US Try: if isnull({tableOne.fieldOne}) or trim({tableOne.fieldOne}) = "" or {tableOne.fieldOne} <> "Y" then "N" else "Y" -k Upvote 0 Downvote
Try: if isnull({tableOne.fieldOne}) or trim({tableOne.fieldOne}) = "" or {tableOne.fieldOne} <> "Y" then "N" else "Y" -k
Dec 19, 2006 #5 RobbieB Technical User Apr 25, 2003 215 US if the field is blank you have to account for this in your formula. It would be something like this if isnull({tableOne.fieldOne})or {tableOne.fieldOne} = "" Then "Not Indicated" else if {tableOne.fieldOne} = "Y" then "Y" else "n Upvote 0 Downvote
if the field is blank you have to account for this in your formula. It would be something like this if isnull({tableOne.fieldOne})or {tableOne.fieldOne} = "" Then "Not Indicated" else if {tableOne.fieldOne} = "Y" then "Y" else "n