Jump to content
Sign in to follow this  
Doobeh

Problem with checkboxes during search

Recommended Posts

Hi there, hope you can help.

On my database, I have a group of about, 10 checkboxes, two of them are quite similar, ones 'film' and the other is 'film classical'

When I do a to find all those with the checkbox film checked, I also get returned the records with the film classical checked.

How can I get around this, I don't want to rename the film/film classical, I just want it to be more precise when searching using checkboxes,.

Any help would be greatly appreciated

Regards,

Doobeh.

Share this post


Link to post
Share on other sites

quote:

Originally posted by Doobeh:

How can I get around this, I don't want to rename the film/film classical, I just want it to be more precise when searching using checkboxes,.

I just did a quicky test with this.

Create a new script, say, Strict Find.

code:

Enter Find Mode [Pause]

Set Field ["FieldName", "=" & FieldName]

Perform Find []

FieldName is the name of the field you are searching in. Attach this script to a button labeled "Find" or what-have-you.

Hope it works as well for you!

Share this post


Link to post
Share on other sites

This is why I always make sure that my value lists, checkboxes, etc., never contain a value that is also a part of another value.

You might want to change "Film" to "Film General", or some such. It might take some doing to change the records, but you'll never have this problem again.

Share this post


Link to post
Share on other sites

Another possibility is to change the field's language to ASCII (under storage options). Then add a sticky space to the end of "film" (Ctrl-space in Windows). If "film" has already been selected in several records, you'll need to do a calculated replace to add the sticky space. Be careful not to add the space to "film classical". The space won't be obvious, but it will enable you to check the "film" box in a find and not get "film classical".

Share this post


Link to post
Share on other sites

The Bridge,

I do not think that your solution works... actually, I'm pretty sure... Searching for "film" by checking its checkbox would return any records where the word "film" is embedded in values of this field... thus returning "film classical", "film general", "how to clean film", etc.

Thom,

I am not familiar with a sticky space... is this mac compatible.. how would it display in a cross-platform solution?

Danjacoby probably has the most practical approach... recognize this as a limitation in Filemaker and adapt.

I regard this almost as a bug in FileMaker that should be fixed in the next release...

[ February 10, 2002, 06:13 AM: Message edited by: CraigH ]

Share this post


Link to post
Share on other sites

quote:

Originally posted by CraigH:

The Bridge,

I do not think that your solution works... actually, I'm pretty sure... Searching for "film" by checking its checkbox would return any records where the word "film" is embedded in values of this field... thus returning "film classical", "film general", "how to clean film", etc.

Thanks -- you're absolutely right. That's why the script I posted appends "=" to the beginning of the field before performing the find.

However, as you said, danjacoby's approach is the safest, and my own preference.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    aztrix55 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.