Jan 6, 2006 #1 karnd Programmer Feb 1, 2003 190 US Hi, created a formula field NUMBER datatype: if not isnull({deptname}) then {AMOUNT} else "" but getting an error - Number is required here on "" my req is i would like show empty or blank if deptname is null for AMOUNT field. any ideas appreciated. Thanks a lot,
Hi, created a formula field NUMBER datatype: if not isnull({deptname}) then {AMOUNT} else "" but getting an error - Number is required here on "" my req is i would like show empty or blank if deptname is null for AMOUNT field. any ideas appreciated. Thanks a lot,
Jan 6, 2006 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Yeah, you're mixing data types in the output of the formula, the 1st condition is numeric, the second a string, you can't do that. Try: if not isnull({deptname}) then {AMOUNT} else 0 Then right click the formula and select format field->X 2 next to suppress, and palce: {@MyFormula} = 0 Or you can convert it all to text: if not isnull({deptname}) then totext({AMOUNT},2,"") else "" The first solution allows for still using the field as a numeric so it's probably the way to go. -k Upvote 0 Downvote
Yeah, you're mixing data types in the output of the formula, the 1st condition is numeric, the second a string, you can't do that. Try: if not isnull({deptname}) then {AMOUNT} else 0 Then right click the formula and select format field->X 2 next to suppress, and palce: {@MyFormula} = 0 Or you can convert it all to text: if not isnull({deptname}) then totext({AMOUNT},2,"") else "" The first solution allows for still using the field as a numeric so it's probably the way to go. -k
Jan 6, 2006 #3 techie2 Programmer Jul 28, 2004 180 US try this: if not isnull({deptname}) then totext({AMOUNT}, 2, ",") else "" Upvote 0 Downvote
Jan 6, 2006 Thread starter #4 karnd Programmer Feb 1, 2003 190 US Hi, Got you, Thanks a lot. Regards, Upvote 0 Downvote