PDA

View Full Version : Search Options (multiple and/or functions)


tcchew
10-03-02, 05:47
Hi all,

Can anyone help me with some search functions.

I have a form with a number of input fields (search fields). How can I code such that I can have multiple search functions (AND/OR)

e.g: ((Field A) AND (Field B) AND ((Field C) OR (Field D)))



Thanks !!

Blaster
11-18-02, 00:09
FileMaker won't understand operators such as (AND,OR,NOT). But depending on type of data you are searching for there are several approaches you might take.

1) You could create a single Calc field that adds all your data fields: = (NAME & " " & ADDRESS & " " & CITY)

This will alow the user to search for any of the data in one 'Find' field.

Or

2) You could create several global fields where the user enters specific data into fields labeled: Containing, Exclude. Then you could script their input and paste the result into the appropriate field and add the filemaker operators "<", "=" and perform the find. Don't forget you can also script the 'Omit' function to exclude specific data types. You can also script the 'mulitple Find' function, which would also deliver a result simular to AND.

I wouldn't use the first option with files with more than 300,000 records or file size of more than 100mb, searching will be very slow.