Jump to content

User input dialog box to search across multiple fields


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

Recommended Posts

  • Newbies

Hi everyone.

I have something here that I'm sure isn't too hard to do but I haven't been able to figure this out myself and I can't seem to find the solution with a quick search either.

What I have is a database with three fields that I would like to be able to search at once with a pop-up dialog box. My hope is to create a button that a user could click and be presented with a dialog box that allows a text string to be entered. This would then perform the same search on the three seperate fields and return a found set of all the matching values.

So...

1) Click button

2) User enters data via dialog box

3) Search is performed (search string found in Field 1 OR Field 2 OR Field 3)

Is this something that can be created via ScriptMaker? I'm not a complete database novice but am not too far above that either.

Thanks in advance for any help you can offer.

Link to comment
Share on other sites

  • Newbies

Thanks for your reply. It looks like I could possibly use this to get it to work. This solution seems rather complicated though.

I guess I was hoping for something not quite as complicated. Maybe somehow assigning the desired search term as a variable and then using that to perform the search.

Link to comment
Share on other sites

I dont see how you feel that it is complicated. The demo that Michael posted is pretty straight forward and almost exactly what you want.

All you really need is a calc field that concatenates the 3 fields that you want. Then a global field to enter what you are searching for, and finally a very short script that performs the find. In your case, the global field is entered by the custom dialog since that is what you wanted.

Link to comment
Share on other sites

Maybe somehow assigning the desired search term as a variable and then using that to perform the search.

You could do it that way, too: enter the search term into a global field (users cannot input data into a variable), then create three find requests, one for each field.

In any case, if you need to search for the same term in three fields, there's very likely something wrong with your data structure - that's where the complications begin.

Edited by Guest
Link to comment
Share on other sites

It doesn't necessarily mean a problem with database structure. Users are used to Google, where a search might reveal a person, a product, a city, a street, etc. My friend Matt is doing a Devcon session on it this year.

Link to comment
Share on other sites

  • Newbies

I did get Mr. Vodka's tip to work then. It certainly gets the job done. I basically just copied for the setup from the linked file and all worked well.

I do agree that if our database was built properly we maybe wouldn't have this problem. The database was built a long time ago on a flat database system and has just been upgraded through the years. A relational database would be great but there isn't anyone here with the time or knowhow to take what we have and rebuild it. I maintain it somewhat but I'm certainly no database programmer.

Anyway, thanks so much for all your help. This takes care of my immediate problem. I'm sure I'll be back on soon with something else though. :smirk:

Link to comment
Share on other sites

  • 8 years later...
1 hour ago, iBob said:

I need to do the same thing

It's really very simple: show a custom dialog using a global field to receive user's input. Then create three find requests (one for each field to search) and in each request set the target field to the value of the global field.

Link to comment
Share on other sites

Maybe a simple 'quick find' would do the job, with or without a script.

http://fmhelp.filemaker.com//help/15/fmp/en/#page/FMP_Help%2Fperform-quick-find.html

Hooray for getting a notification on a 9-year-old thread. FileMaker 9 was current at that time. We got Perform Quick Find in FileMaker 11 (2010).

Link to comment
Share on other sites

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