Searching for Numbers

Has anyone experienced a problem searching for numbers with parenthesis around them? Specifically, when I type the following into the Search Bar in the Notes Client:

FIELD Amount < 500

I get a listing of 10 documents, however when I add parenthesis to it:

( FIELD Amount < 500 )

I get “Query is not understandable”. I get the same results from the Notes Client, and LotusScript. Since I’m building search strings with multiple conditions I need to be able to divide up my arguments, by using parenthesis.

Has anyone found a solution or work around?

[I’m using Notes 6.5]

Subject: Searching for Numbers

Hi Rich,

The reason of “Query is not understandable” could be Amout item that appear in TEXT format.

May your previous version of application included this item in text format or some forms contain this item in TEXT format.

You can check this by simple view search in client. Just select related view, than go to search by FIELD, select AMMOUNT item and you will see what type of opperation is available: contains… or is equal…

If contains appear it’s meaning that some Amount item in text format appear in the database.

Solution: try to search this document. May be remove it or replace value to number. If no document there try to find this item in form and change it’s format.

May You just nee to delete your index and recreate it.

Best regards,

Dima Pechersky

Subject: RE: Searching for Numbers

Hi Dima:The Amount field is a NUMBER format, and it does give me the appropriate “is equal to, is greater than…”. I did have a previous problem which you are referring to, where a DATE field was coming up as a TEXT field. Using the solution from this forum I was able to fix it by deleting the field, deleting the index, & compacting the index.

This problem is weirder and to elaborate:

If I type:

FIELD FORM = Invoice AND FIELD Amount < 500

I get 10 documents, but typing

FIELD FORM = Invoice AND ( FIELD Amount < 500 )

gives me “Query is not understandable”. If the field happens to be a DATE or TEXT field and I use the parenthesis, then it works fine. So,

FIELD FORM = Invoice AND (FIELD InvDate < 04/10/2004 )

or,

FIELD FORM = Invoice AND (FIELD Name = “Lotus” )

both work fine. It’s only if the field is a NUMBER field and I try putting parentheses around them, do I run into a problem.

Weird, right?

Subject: RE: Searching for Numbers

Try this format:(FIELD FORM=“Invoice”) AND (FIELD Amount<500)

just remove all leading blanks

or may be this one

([FORM]=“Invoice”) AND ([Amount]<500)

Subject: RE: Searching for Numbers

Thanks Dimi

That worked great. I noticed it just doesn’t like any spaces before the RIGHT parenthesis and the numeric value, but the LEFT one is okay.

Oh well, who would have thought.