Newbies yamit Posted September 14, 2000 Newbies Posted September 14, 2000 Is it possible to do a search from two fields of one field. In other words, I have a database that has two views/layouts, one is a search layout that has the fields for CD number, Job number, File name, and Location. The other layout is where the actual data will be put in has fields for CD number, Location, and Contents. In the Contents field there will be a job numbers: next to each job number will be a file name (I am doing this to simplfy input). I want that when someone types in the search field a job numer or a file name that it will search for either one or both in the contents field of the other layout. Is this possible to do and how can it be done? Please give explaination indepth as possible as I am relativly new at this. I am using Filemaker 3.
Chuck Posted September 14, 2000 Posted September 14, 2000 quote: Originally posted by yamit: Is it possible to do a search from two fields of one field. In other words, I have a database that has two views/layouts, one is a search layout that has the fields for CD number, Job number, File name, and Location. The other layout is where the actual data will be put in has fields for CD number, Location, and Contents. In the Contents field there will be a job numbers: next to each job number will be a file name (I am doing this to simplfy input). I want that when someone types in the search field a job numer or a file name that it will search for either one or both in the contents field of the other layout. Is this possible to do and how can it be done? Please give explaination indepth as possible as I am relativly new at this. I am using Filemaker 3. You can do this, but you'll have to script the search. You'll also need a couple of extra global text fields, which I'll call gJobNumber and gFileName. Place these fields on your search layout instead of the JobNumber and FileName fields. The script would be something like this: Go to Layout [ Search ] Enter Browse Mode [] Set Field [ gJobNumber, "" ] Set Field [ gFileName, "" ] Pause/Resume Script [] Enter Find Mode [] Set Field [ JobNumber, gJobNumber ] Set Field [ FileName, gFileName ] New Record/Request Set Field [ Contents, gJobNumber & gFileName ] Perform Find [] Go to Layout [ Entry ] When the user enters a search, they aren't actually entering find criteria into the fields they want to search. They are doing so into gloal fields. That's why you need to clear the fields of any data before you let them enter data. If you don't, then the fields will have the search criteria that the user used last time. Once you have the criteria they want to search on in the global fields, you script the entering of the find mode and the entering of the search criteria. The New Record/Request step is saying that you want to find record that have the information in the two normal fields OR in the single contents field. Chuck
Recommended Posts
This topic is 8990 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 accountSign in
Already have an account? Sign in here.
Sign In Now