# What is the Opposite of IsEmpty (Field)

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

## Recommended Posts

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

##### Share on other sites

not IsEmpty ( Field )

##### Share on other sites

OH... I THOUGHT i TRIED THAT COOL i WILL TRY THAT AGAIN.. LET YOU KNOW

THANKS

##### Share on other sites

Cool that worked thank you

##### Share on other sites

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.

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.

##### Share on other sites

I am NOT NOT cracking up, Vaughan!!

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

##### Share on other sites

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

##### Share on other sites

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

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.

LaRetta

##### Share on other sites

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.

##### Share on other sites

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

##### Share on other sites

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.

##### Share on other sites

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

##### Share on other sites

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

## Create an account

Register a new account