Jump to content

This topic is 8935 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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

Posted

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).]

  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.