Jump to content

testing against a two digit number


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

Recommended Posts

Hi, I have the following calculation in one of my database fields. The test will check if a specific field has a value of 3 or above, and if so marks Passed, otherwise marks failed. It works fine as long as the result of the field isnt a two digit number that starts with 1 or 2. (11, 21, 19, 25 etc) . The calculation below seems to only be evaluating the first number, not  the total number. 

 

If (  ( Initial Test Buffer PSID ≥  "3"); "Passed" ; "Failed")

 

another with the same issue, but 2 rather than 3: 

 

If (  ( Initial Test Relief Valve Opened at psid ≥  "2"); "Passed" ; "Failed")

 

 

I would love to hear feedback to how I can fix that. Thanks so much! 

Link to comment
Share on other sites

Take the quote marks off the number.  They tell FileMaker to evaluate the number as a string rather than a number, which produces the result you are seeing.

 

( Initial Test Buffer PSID ≥  "3")  should be  (Initial Test Buffer PSID ≥  3)

Link to comment
Share on other sites

 

If (  ( Initial Test Buffer PSID ≥  "3"); "Passed" ; "Failed")

 

 

And just for future, you can drop that extra set of parentheses because they aren't needed, so it becomes:

 

If (  Initial Test Buffer PSID ≥  3 ; "Passed" ; "Failed" )

 

:-)

Link to comment
Share on other sites

This topic is 2849 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
 Share

×
×
  • Create New...

Important Information

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