Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > PC based Database Applications > FileMaker > Find using checkboxes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-20-07, 11:24
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
Find using checkboxes

I'm working on a database where they often search using checkboxes. The value lists for the check boxes contain spaces and this is causing incorrect result sets to be returned.

Example list values would be
1. Newsletter
2. Newsletter Do Not Mail

If they click the Newsletter in find mode the results returned will include both Newsletter and Newsletter Do Not Mail. Is there a way to force it to find an exact match only. I know how to do this with "" or == but not using a checkbox.
Reply With Quote
  #2 (permalink)  
Old 10-20-07, 11:45
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
If you script the Find, you can insert the "==" in the search criteria as needed:

Enter Find Mode[]
Pause Script
If [ not isempty(field) ]
Set Field [ field; "==" & field ]
End If
Perform Find[]
...
Reply With Quote
  #3 (permalink)  
Old 10-20-07, 11:58
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
Thank you so much. Could you please explain with a little more detail? I'm new to Filemaker (3 weeks now).
Reply With Quote
  #4 (permalink)  
Old 10-20-07, 15:33
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
I'm working on this now. One question. If I use a Set Field while in find mode does it modify the actual data or just the find string?
Reply With Quote
  #5 (permalink)  
Old 10-20-07, 16:19
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
It works! Thanks.

One thing though. I ended up needing to do a literal text match instead of a field content. I ended up with this

"\"" & field


I would have thought it should have been this to work
"\"" & field & "\""

both ways worked. Will it do a literal match with only a leading quote?
Reply With Quote
  #6 (permalink)  
Old 10-20-07, 22:07
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
Quote:
One thing though. I ended up needing to do a literal text match instead of a field content. I ended up with this

"\"" & field

That doesn't sound right at all. A Find for:

"Newsletter

or even

"Newsletter"

would find both: 'Newsletter' and 'Newsletter Do Not Mail'.

Go back to the "==" method that I outlined above.
Reply With Quote
  #7 (permalink)  
Old 10-20-07, 23:52
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
I used a bad example. It should be

Newsletter Recipients
Newsletter Do Not Mail


The reason I couldn't use the "==" is there are other checkboxes for this field and people could be members of other groups besides the Newsletter ones. With the "==" I only got members who were in the Newsletter groups only. If they belonged to anything else it didn't match.

Thanks for the help. I've tested it and it works well.
Reply With Quote
  #8 (permalink)  
Old 10-21-07, 11:46
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
In that case, just search for the value (without quotes).
Reply With Quote
  #9 (permalink)  
Old 10-21-07, 12:58
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
Without the quotes I get results from both. The case that causes the most problems is

China Member
China Non-Member
2003 China Meeting

Without quotes, if I select China Member I will get results from the other 2 also. If they had named them with an underscore instead of a space this wouldn't be a problem, but Filemaker matches on the China by itself and on Member by itself becuase of the space.
Reply With Quote
  #10 (permalink)  
Old 10-21-07, 17:31
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
In that case you do need the quotes around the search string, since you want to find records containing the phrase "China Member", not just the words "China" and "Member". But records containing only the value "2003 China Meeting" would not be returned in either case.
Reply With Quote
  #11 (permalink)  
Old 10-22-07, 11:08
wvdb wvdb is offline
Registered User
 
Join Date: Sep 2007
Posts: 13
I'll test it again for the 2003 China Meeting, but I believe when I searched on China Member it returned results for 2003 China Meeting also.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On