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

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

Recommended Posts

Posted

Hi everyone,

I’d be grateful if someone could help me with a Boolean "OR search".

I would like to offer my users a possibility to simply key in a phrase like searchtermA OR searchtermB when they search for different values in one field. Using Extend Found Set is way too complicated in my humble opinion. On top, I am very restrictive when it comes to giving access to menu options. Accessing Extend Found Set from the menu bar is not available for my users.

I guess I have to write a nice script...

Thank you very much for your input!

Mike

Posted (edited)

Here's one idea (see attached) ...

You would of course remove the status area and Users must use your buttons. They would hit Enter Find again and they can watch their OR criteria. If they wish to remove one of the criteria, hit the X. Then when ready, Perform Find.

Do not use the status area for this process; you should hide it using Hide Status Area [ Lock ]. You can also add a button to duplicate the request (next to the delete button). Sorry I didn't have time to get fancier.

UPDATE: I corrected the simple script and added Set Error Capture [ On ] so it would error trap.

FindRequests.zip

Edited by Guest
Posted

I didn't even begin my script with Get ( LastError) and of course I should have. :blush2:

It is quite fitting that this bit me seeing that I had an attitude on the subject just yesterday. Things that go around, come around ... or something like that. Anyway, please remember to error trap if this script is used.

Posted

Hey LaRetta!

Thank you again for your help. I've tried it right away and it looks very interesting!

(Hope my users won't nag too much : It is just that as professional database users they are used to easy Boolean connectors like AND, OR, NOT, ( ), ATLEAST,...)

And Thanks for mentioning the error script thing, too! Very hepful!

Mike

Posted

Hi Mike,

The approach provided is just one way. I like it because, when there are many fields on the layout, it can also offer great flexibility by allowing the User to see their criteria and modify after the fact (and before they perform the find). But there are many approaches! If you can walk me through the vision of exactly what you would like, I have no doubt we can give it to your Users. Can you give me step-by-step walkthrough?

LaRetta :wink2:

Posted (edited)

If you want Users to type into one field (for example):

Douglas or Martha

Script can actually handle this. Let me know. But it can break easily with mistypes. BTW, this IS a professional database. But it will only be as good as the design. So give me your vision and someone here will help you make it so. :laugh2:

BTW, I corrected the prior file. I had Get ( LastError ) on my mind for reasons I won't go into. But what I meant is that you must trap for errors. I've modified the script slightly to account for no records found

Edited by Guest
Added BTW
Posted

Hey LaRetta,

Many thanks for your efforts!! Wow. I tried the corrected file, thank you : Works fine!

As for the OR SEARCH: Exactly, a thing like Douglas or Martha is what I have in mind.

As mentionend, I am very reluctant when it comes to giving my users access to the menu bar. My aim is to place scripted buttons on the layout, so that "accidents" won’t happen all too easily. I created a Search Layout; so, when a user aims to find records, he clicks a button and a script starts that causes search layout to appear, the user then is being put in Find Mode, and while the script is stopped until he clicks Perform Find he can enter search terms. Most of the scripts include custom error messages, the change of global fields and so on. (I really like scripting : ) What I’d like to implement now is an easy OR SEARCH; I wonder if it is possible to create a script where a user enters Douglas or Martha in a field, and when he clicks the Perform Find button he gets all the records with either Martha or Douglas or both. As I haven’t found an easy way to create such a thing, neither in different forums nor in Filemaker books, I guess this won’t be easy...

And as for Filemaker being a professional database system: Yes, I am definitely of your opinion. It is amazing what Filemaker can do; and how well it helps the developer focusing on what is important. Just love it!

Posted

Hey comment,

(Sorry for the late response - was away over the w/e), Thank you very much for your input and the file. Looks very interesting! This gives me a good start to work on the topic...

Regards!

Mike

:

This topic is 5953 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.