Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Scripting literal searches for fields that are formatted to contain checkboxes


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

Recommended Posts

Posted

Hi Guys,

In a little bit of a pickle here. I'm trying to convert an old legacy system into a new filemaker solution. Ive got a checkbox field called categories which contains about 15 values. Five of the values are Former Pupil, Current Pupil, Former Parent, Current Parent and Current Staff. So if my users click on the check box Current Parent in find mode and perform find, they are getting records which contain Current Staff and Former Parent as well in the field. To get around this of course you do a search "Current Parent" within quotatation marks.

If I wanted to keep the values the same for my checkbox, 12 year old system with thousands of records - is there anyway I can script literal searches when the user enters values in the check boxes.

Many Thanks for advice

Jalz

Posted (edited)

Use a script trigger on Mode Exit (Find Mode only). The triggered script will loop through each find request, looping through each value selected and adding a " to the beginning and end of each value.

Edited by Guest
  • 3 weeks later...
Posted

Hi all,

Thanks D J for the suggestion. I’ve used a script trigger on Find Mode Exit to get the search values in the category field and put quotes around it to do the find. I’ve also used the script debugger to make sure this is happening, however FileMaker still returns 71 records if I search for Current Pupil – when it should be finding 2, basically ignoring the quotes as if they were not there.

Any ideas what I could be doing wrong? I’ve attached a sample file to show you my script

Thanks

Jalz

find.zip

Posted

Thanks Comment :beertime:

Cant believe it was as simple as that!

This topic is 5314 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
×
×
  • Create New...

Important Information

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