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

Recommended Posts

Posted (edited)

I have set up a find using global fields. In the example below I would like to search the size of something.

The calculation I used resulted in an error that says this number cannot be evaluated and I dont know why.

Here is the case statement:

Case (

(IsValid ( F_Size_Low ) and IsValid ( F_Size_High )) ; "(F_Size_Low) & "..." & (F_Size_High)";

(IsValid ( F_Size_Low ) and IsEmpty ( F_Size_High )) ; "(F_Size_Low) & "...50";

(IsEmpty ( F_Size_Low ) and IsValid ( F_Size_High )) ; ""0..." & (F_Size_High)"

)

The first test says that if both are valid then search the range.

The second say that if the low is valid and the high is not, search the range from the valid low to 50.

The third says that if the high is valid and the low is not search the range from the high to zero.

Where did I go wrong?

Thanks,

Drew

Picture_24.png

Edited by Guest
Posted

There are a couple problems I can see right off the bat. 1. Don't use IsValid() for this purpose, instead use 'not isempty()'. Second, your quotes aren't matched up correctly; in fact, quotes aren't needed around field names.

Anyway, you can probably simplify the calc a bit:

Case (not isempty ( F_Size_Low ); F_Size_Low; 0) &

"..." &

Case (not isempty( F_Size_High ); F_Size_High; 50)

Posted

Thanks for the reply. That worked great. I am just starting to get in to doing calucalations and appreciate the help. I thought you could do the "not isempty" but could not find it in the help file (which is suprisingly helpful).

I want to make sure I understand the calculation correctly.

Case (not IsEmpty ( F_Size_Low ); F_Size_Low; 0) says that if Low has somehting in it then use that value but if not then use 0.

Case (not IsEmpty( F_Size_High ); F_Size_High; 50) says that if High has something in it use that value otherwise use 50

Is this correct?

Thanks for your help

Drew

Posted

Ya sure. You could also write it like this:

Case (isempty ( F_Size_Low ); 0; F_Size_Low) &

"..." &

Case (isempty( F_Size_High ); 50; F_Size_High)

Posted

IsValid() is meant for checking the type-match of the data or that a relationship is intact, not for checking if a field contains information. You might check the function description in the application Help.

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