Jump to content

Problem with checkboxes during search


Doobeh
 Share

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

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.

Link to comment
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!

Link to comment
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.

Link to comment
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".

Link to comment
Share on other sites

  • 1 month later...

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 ]

Link to comment
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.

Link to comment
Share on other sites

This topic is 7191 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
 Share

×
×
  • Create New...

Important Information

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