Newbies Guy007 Posted June 12, 2000 Newbies Posted June 12, 2000 If I try to use division in a calculation field and the divisor is another field (say Field A), the whole program crashes if Field A is blank. I tried using an IF format IF(FieldA <> "", etc.) but no matter what form I try, a blank in Field A = CRASH. I'm using FM 3.0v3. Is there anyway to get around this? Thanks. Guy
Louisa Posted June 12, 2000 Posted June 12, 2000 Hi, I don't know if this would work with the way you have things set up, but why not set the default value of Field A = 1 so that it has the same non-effect on a calculation as a blank field but won't crash. Louisa
ZuperZZ Posted June 12, 2000 Posted June 12, 2000 Guy, I think the IF function is the best solution, but instead : IF(FieldA <> "") try : IF(IsEmpty(FieldA)=0,FieldB/FieldA,0) <If the field is empty the result is 1, if it contains some data =0. Knowing this you can define if perform the calculation or not> ZZ [This message has been edited by ZuperZZ (edited June 12, 2000).]
LiveOak Posted July 3, 2000 Posted July 3, 2000 OBTW: The boolean way to express "IsEmpty(field)=0" is notIsEmpty(field).
LiveOak Posted August 17, 2000 Posted August 17, 2000 FYI: A more technically correct use of IsEmpty() is: If(IsEmpty(A), result1, result2) or If(notIsEmpty(A), result1, result2) The first is equivalent to IsEmpty(A) = 1, the second to IsEmpty(A) = 0. The IsEmpty() function already evaluates to a boolean true or false, there is no need to compare it to 1 or 0. -bd
Recommended Posts
This topic is 8935 days old. Please don't post here. Open a new topic instead.
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