Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a fairly complex calculation that works fine except for one situation. Basically it's calc;calc;calc/number_services plus a lot of other items. It doesn't work, of course, if number_services is "0" because you can't divide by zero. It messes up the whole calculation. So just for fun I tried calcs etc/number_services>0 and it worked. I'm quite surprised that FM would accept field>0 as a definition. Am I missing something here? As it turns out I didn't trust this method and set up validation on the number_services field to be not empty and to have a value greater than zero instead. This is academic for sure, but I'm curious all the same.

Posted

The file is huge. The question is academic. Think of it this way. 600/number_services. If number_services is 6, the answer is 100. If number_services is 0 the answer is ?. If the calc is 600/number_services>0 other parts of the calculation work fine.

Posted (edited)

This is interesting. I didn't know you could skip an error this way.  What happens here, I think, can be explained by =

0 / 0 = "?"

returning True instead of error. IOW, Filemaker puts the error (or rather the error symbol) on one side of the equation and then proceeds to evaluate as if nothing has happened. OTOH =

EvaluationError ( Evaluate  ( "0 / 0 = "?"" ) )

returns 15 ('Can't divide by zero'), so this could well be a bug instead of intended behavior.

Edited by comment

This topic is 4426 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.