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

Recommended Posts

Posted

I know how the equation IsEmpty works, I need to know if there is a way to say the opposite... when the field is not empty do this.... is there a easy way?

Joseph

Posted

Alternatively... IsEmpty( field ) = 0

I can see no advantage to either... I use =0 instead of NOT and have standardised on it for my own consistency. I save NOT for long and complex boolean expressions to save me having to lookup how XOR and those other expressions work. wink.gif

My Deep Thought for the day: In a parallel universe somewhere there may be another me exact in all things EXCEPT they use NOT insted of =0.

Posted

I am NOT NOT cracking up, Vaughan!! grin.gif

I use NOT and NOT NOT for everything I possibly can! I think it's shorter, clearer and easier to read.

Posted

I use NOT and NOT NOT for everything I possibly can! I think it's shorter, clearer and easier to read.

Hm ...seen from which perspective??? I'd often done it differently:

1 xor _any value_ and 0 xor _any value_

...not that it's more or less clean to read, or shorter. But if my logic have flawed to behave oppsosite, is the key sequence shift-arrow right the opposite value. Where a series of NOT's requires much more keystrokes to change or even worse some mousing!

But back to the threads original question. Two other ways to handle it comes to mind:

Count(Field)

and

Length(Field)

Especially where a validation should check if all fields in a record holds values, makes Count( sense ...

If you make paused loops, can check the entire records fields in one line, by just mentioning each field like Count(field1,field2,field3,field4) = 4.

not IsEmpty(field) is the same as Length(field), what you have to remeber is that all other lenghts than no length are considered true.

--sd

Posted

Not sure I understood the first part of your post entirely, Soren, but I get your overall perspective I think. wink.gif

NOT NOT is handy for converting results which are number to a 0/1 boolean; PatternCount() for instance. I certainly don't use it when other things work but it seems much easier than If(PatternCount() > 0;...

XOR ... big weakness of mine ... either I don't understand it XOR I understand it or I don't or both. It strikes me the same as the saying, "The Department of Redundancy Department." It's logic escapes me. I think I'll move that puppy up on my list of Things To Figure Out XOR I won't. I tend to slide it down the list because there are always other ways to accomplish the same thing. grin.gif

LaRetta

Posted

NOT NOT is handy for converting results which are number to a 0/1 boolean

Yes it is, but you don't need that very often. For example,

If(PatternCount() > 0 ; ...

is the same as

If(PatternCount() ; ...

IOW, 0 is false, ANY other (numerical) value is true.

Posted

NOT NOT is handy for converting results which are number to a 0/1 boolean; PatternCount() for instance.

But all 4 boolean operators typecast anything they touch {not,or,and,xor} similar behaviour is retreived from Sign( which takes all numerical values, integer or reals and turn them into either {-1,0,1} ...but a good thing to remeber is that Choose( have a similar way of handling reals, say your calc returns 4.388 then is the result ushered from the 5th position ...remember 0 is 1st position.

--sd

Posted

I also use 'not not', but only when one function that doesn't return a natural boolean is an input for another function which requires a boolean parameter, or I absolutely require a boolean result. I could use xor, but I like double negatives when they make sense. wink.gif

Posted

I made some speedtests yesterday between Lenght(aField) and not IsEmpty(aField) - which were

a loop of twenty lines setting the field to it's own either Lenth( or not IsEmpty( ... I found there is no significant difference speedwise between the two Lenght( is just a tad faster when it came up to 2000 loopings ... I didn't bother testing Count( - guessing that these gives the same close results.

Behind the screens is the calc's apparenlty if posible reduced down to lowest level???

--sd

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