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 7156 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have a calculation that is looking at a numeric field (NUM):

if(NUM <4; "ok"; "not ok")

(The calculation is actually more involved, but this is the part causing problems...I've simplified the results - "ok" and "not ok" - just for ease of explanation here.)

The problem I'm seeing is that if NUM is left blank, the calculation evaluates it as zero, thus causing the result to be "ok", when I need the result to be "ok" only if NUM contains 1, 2, or 3.

I would imagine that the simplest way to resolve the issue is to put an additional "if NUM is blank then" condtion into the calculation, but for a variety of reasons I would like to avoid this. Does anyone know of another solution?

Many thanks, and apologies if this is a ridiculously simple question! smile.gif

julia

Posted

Ciao,

try this calculation:

If(Num * Num / Num <4; "ok"; "not ok")

(if you write some space inside Num, the result will be "not ok". The result will be "" if NUM is left blank, but you setted the CalcField to "not evaluate if all referenced fields are empty")

Posted

Hi raybaudi,

I guess it is a matter of what julia wants to be the answer for 0.

0 produces Ok in the other two calculations and Not Okay in yours.

Lee

Posted

Thanks all for the suggestions - I appreciate it. I tinkered with a few things, and think that a Case() scenario is probably the best bet for this purpose. I forgot to mention that the NUM field is validated upon data entry with a range that doesn't include zero.

I think I'm all set. Thanks again! Much appreciated. smile.gif

julia

Posted

Hi Lee Smith,

she said:

when I need the result to be "ok" only if NUM contains 1, 2, or 3.

so I assumed that for 0 she needs "not ok"

Posted

I need the result to be "ok" only if NUM contains 1, 2, or 3

I missed that part. Then perhaps the best way would be to say exactly that:

Case ( Position ( "x1x2x3x" ; "x" & NUM & "x" ; 1 ; 1 ) ; "OK" ; "NOT OK" )

Posted

Hi comment

your solution is very good !

She also said:

I would imagine that the simplest way to resolve the issue is to put an additional "if NUM is blank then" condtion into the calculation, but for a variety of reasons I would like to avoid this.

So I tried to not use a case function , as it's the same of a multi-if function.

(BTW my calc is good also for decimals!)

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