dbTalk Databases Forums  

Strange search results in concatenated field

comp.databases.filemaker comp.databases.filemaker


Discuss Strange search results in concatenated field in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Carlos Pereira
 
Posts: n/a

Default Strange search results in concatenated field - 06-13-2005 , 02:25 AM






Hi,

I am using FMPro 5.5. I have created a concatenated field C1

C1 = calculated text field, indexed, flag1 & "_" & flag2
flag1 and flag 2 and 2 indexed text fields, with 2 possible values
each: 1 or 0.

Therefore, C1 can only be: 0_0, 0_1, 1_1, 1_0

However, I am getting strange results when I search C1.

If I search for 0_0, I get 0_0, 0_1 and 1_0 records.
If I search for 0_1, I get 0_1 and 1_0 records
If I search for 1_0, I get 0_1 and 1_0 records (identical results as
for 0_1)
If I search for 1_1, I get 0_1, 1_0 and 1_1 records

I have tried changing the source fields to Number, and the Concat
field to number as well. No luck, same results.

I have tried unindexing the field and then rebuilding the index, but I
get the same results. It must be sometihng else.

Where is the problem?

Thank you

Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Strange search results in concatenated field - 06-13-2005 , 02:38 AM






I think it is because the "_" sign is not taken into account in a
search. Then, when calling for "0_0" is the same as if you were calling
for " 0 0".
There a number of characters that not taken into account : . , ; : - _
space and others.
You may try changing your "_" into "&". It works.
Remi-Noel

"Carlos Pereira" <cpereira (AT) nnnhotmail (DOT) com> a écrit dans le message de
news: 4bcqa1l90q8m5uos8e2sqvc6tc8dpfn7n3 (AT) 4ax (DOT) com...
Quote:
Hi,

I am using FMPro 5.5. I have created a concatenated field C1

C1 = calculated text field, indexed, flag1 & "_" & flag2
flag1 and flag 2 and 2 indexed text fields, with 2 possible values
each: 1 or 0.

Therefore, C1 can only be: 0_0, 0_1, 1_1, 1_0

However, I am getting strange results when I search C1.

If I search for 0_0, I get 0_0, 0_1 and 1_0 records.
If I search for 0_1, I get 0_1 and 1_0 records
If I search for 1_0, I get 0_1 and 1_0 records (identical results as
for 0_1)
If I search for 1_1, I get 0_1, 1_0 and 1_1 records

I have tried changing the source fields to Number, and the Concat
field to number as well. No luck, same results.

I have tried unindexing the field and then rebuilding the index, but I
get the same results. It must be sometihng else.

Where is the problem?

Thank you



Reply With Quote
  #3  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Strange search results in concatenated field - 06-13-2005 , 03:07 AM



Thank you.

I will try your suggestion, although I will need to alter many fields
in my database (I tend to use the underscore sign (_) in concatenated
fields). I am just surprised I never noticed this issue before...

Thanks again,

Carlos


On Mon, 13 Jun 2005 09:38:14 +0200, "Remi-Noel Menegaux"
<rnmenegaux (AT) free (DOT) fr> wrote:

Quote:
I think it is because the "_" sign is not taken into account in a
search. Then, when calling for "0_0" is the same as if you were calling
for " 0 0".
There a number of characters that not taken into account : . , ; : - _
space and others.
You may try changing your "_" into "&". It works.
Remi-Noel

Reply With Quote
  #4  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Strange search results in concatenated field - 06-13-2005 , 09:48 AM



Remi-Noel is correct about Finds recognizing the underscore as a word
separator. Your Find should work however if you put quotes around the
criteria (i.e. search for "0_0" WITH the quotes).

BTW, I always use underscores as separators in my concatenated fields,
and these work great for relationships. In visually looking at the
field contents, it is easy to see where the separate parts are and
everything is tied together by the underscore. But with the limits on
word indexing lengths, FMP still sees the underscored concatenation as
separate words so that it gets properly indexed.

Carlos Pereira wrote:
Quote:
Hi,

I am using FMPro 5.5. I have created a concatenated field C1

C1 = calculated text field, indexed, flag1 & "_" & flag2
flag1 and flag 2 and 2 indexed text fields, with 2 possible values
each: 1 or 0.

Therefore, C1 can only be: 0_0, 0_1, 1_1, 1_0

However, I am getting strange results when I search C1.

If I search for 0_0, I get 0_0, 0_1 and 1_0 records.
If I search for 0_1, I get 0_1 and 1_0 records
If I search for 1_0, I get 0_1 and 1_0 records (identical results as
for 0_1)
If I search for 1_1, I get 0_1, 1_0 and 1_1 records

I have tried changing the source fields to Number, and the Concat
field to number as well. No luck, same results.

I have tried unindexing the field and then rebuilding the index, but I
get the same results. It must be sometihng else.

Where is the problem?

Thank you
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #5  
Old   
42
 
Posts: n/a

Default Re: Strange search results in concatenated field - 06-13-2005 , 12:41 PM




Depending on your requirements you may want to experiment with changing
the language of the field. Its been a while since I've had to do this,
but I seem to recall that there is an option to set the language to
ascii, which indexes many of the characters that "English" ignores.

Switching to ascii does some other strange stuff though... sort order
becomes a..zA..Z instead of aA..zZ etc.


Quote:
I think it is because the "_" sign is not taken into account in a
search. Then, when calling for "0_0" is the same as if you were calling
for " 0 0".
There a number of characters that not taken into account : . , ; : - _
space and others.
You may try changing your "_" into "&". It works.
Remi-Noel

"Carlos Pereira" <cpereira (AT) nnnhotmail (DOT) com> a écrit dans le message de
news: 4bcqa1l90q8m5uos8e2sqvc6tc8dpfn7n3 (AT) 4ax (DOT) com...
Hi,

I am using FMPro 5.5. I have created a concatenated field C1

C1 = calculated text field, indexed, flag1 & "_" & flag2
flag1 and flag 2 and 2 indexed text fields, with 2 possible values
each: 1 or 0.

Therefore, C1 can only be: 0_0, 0_1, 1_1, 1_0

However, I am getting strange results when I search C1.

If I search for 0_0, I get 0_0, 0_1 and 1_0 records.
If I search for 0_1, I get 0_1 and 1_0 records
If I search for 1_0, I get 0_1 and 1_0 records (identical results as
for 0_1)
If I search for 1_1, I get 0_1, 1_0 and 1_1 records

I have tried changing the source fields to Number, and the Concat
field to number as well. No luck, same results.

I have tried unindexing the field and then rebuilding the index, but I
get the same results. It must be sometihng else.

Where is the problem?

Thank you




Reply With Quote
  #6  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Strange search results in concatenated field - 06-14-2005 , 04:56 AM



Dear Howard,

Thank you for your comments. I also favour the use of underscore in
concatenated fields and my relationships based on these fields seem to
work fine. But I got confused after creating a Find script that
refused to work, based on one of the concatenated fields.

I have not found references to this behavior in the FileMaker
documentation. It would be handy to have them. For instance, what
characters should be included under quotes in a Find, and which ones
work OK in a relationship but not in a standar Find.

Regards,

Carlos


On Mon, 13 Jun 2005 07:48:57 -0700, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Remi-Noel is correct about Finds recognizing the underscore as a word
separator. Your Find should work however if you put quotes around the
criteria (i.e. search for "0_0" WITH the quotes).

BTW, I always use underscores as separators in my concatenated fields,
and these work great for relationships. In visually looking at the
field contents, it is easy to see where the separate parts are and
everything is tied together by the underscore. But with the limits on
word indexing lengths, FMP still sees the underscored concatenation as
separate words so that it gets properly indexed.

Carlos Pereira wrote:
Hi,

I am using FMPro 5.5. I have created a concatenated field C1

C1 = calculated text field, indexed, flag1 & "_" & flag2
flag1 and flag 2 and 2 indexed text fields, with 2 possible values
each: 1 or 0.

Therefore, C1 can only be: 0_0, 0_1, 1_1, 1_0

However, I am getting strange results when I search C1.

If I search for 0_0, I get 0_0, 0_1 and 1_0 records.
If I search for 0_1, I get 0_1 and 1_0 records
If I search for 1_0, I get 0_1 and 1_0 records (identical results as
for 0_1)
If I search for 1_1, I get 0_1, 1_0 and 1_1 records

I have tried changing the source fields to Number, and the Concat
field to number as well. No luck, same results.

I have tried unindexing the field and then rebuilding the index, but I
get the same results. It must be sometihng else.

Where is the problem?

Thank you


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.