Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I've done some interesting things with the Database that I've built. However, I STILL don't understand the difference between <> and NOT.

I've got a script that says this:

IF[EX PI Lock <> "Yes"

and

(EX Note = "Do PI 1"

or

EX Note = "Do Dup PI"

or

EX Note = "Do PI/Accounts"

or

EX Note = "Do PI w/Docs")]

If I do it this way, it processes rest of the if statment even when EX PI Lock is "Yes". If I use NOT, it never processes the If statement, no matter what EX PI Lock says.

What am I missing??

Thanks!

Posted

<> is 'not equal to', which isn't necessarily the same as not. Not can be used to negate otherwise true statements, such as not PatternCount( ), which would be equivalent to PatternCount( ) = 0. A similar result with <> would use PatternCount( ) <> 1 and PatternCount( ) <> 2, etc., from negative to positive infinity, excluding zero, of course. So <> must compare two statements, while not only requires one. In general, though, A <> B == not (A = :.

In your example, I would guess that your Lock field has been defined as a number, so that it will never equal a text value, even if text is entered in it.

Posted

NOT means "the opposite of" but it's only applicable to boolean logic (yes and no, 1 and 0).

field1 <> field2 is equivilent to

not field1 = field2

Posted

Yes, that's what I said. wink.gif Although it can also be used to 'force' non-boolean statements into boolean ones.

  • Newbies
Posted

I think we can be more clear on this.

A boolean is either true or false: True is any value other than zero, False is zero.

If the data in the field is text, whether the field is a text field or not, FileMaker will try to interpret it as a number, so if there is a zero in the text, it will be false, and if there is any other number it will be true. If there is no number it will be true.

Not will give the opposite of whatever you give it:

Not 1=0.

Not 0=1.

Not( "words")=0.

Not ("words0")=1.

As you said, <> compares two values to give a boolean true (1) or false (0).

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