Well you could do something like this.
- Create a Global Table
- Create fields for name, phone, email (Make sure you make them global under storage options)
- Use the script step Show Custom Dialog (Provide a title, instructions, and then on the "Input Fields" tab designate the global fields you just created to receive the output).
- No you can script entering find mod and use Set Field to set the corresponding field to the value in the global.
Have you thought about using Quick Find (Upper right side of Status Bar). In the Inspector (layout mode) there is a quick find checkbox, make it active on the fields you want used (Surname, Phone, Email).
For examples of scripted finds, see: Scripted Find Examples
Show Custom Dialog is the quick/simple approach that works best for simple text fields that do not need a value list or data validation. (To validate input from a custom dialog, you have to validate the input after the user clicks a button in the dialog--which means if there's an error, you have display an error message and then loop back and display the original custom dialog.)
But you can also use New Window, followed by go to layout to set up a dialog box where you design a fileMaker layout to serve as the interface for the user's input and then you have all the validation tools, value list formatting, etc you might need to help the user enter data quickly and accurately. There is an advanced window option that makes the window a modal window so that the user can't "lose" the window by clicking another.
So far I got
Enter Find Mode 
Show Custom Dialog ["Customer Search"; "Enter criteria to search for specific customers."; Customers:: Surname; Customers::Telephone Number; Customers::Email Address]
If [(Get (LastMessageChoice) = 1)]
Perform Find 
In the original fields within the customers table there is validation rules within the fields Surname, Telephone Number and Email Address. Where would I enter these so that they apply to the search criteria?
And how and where would I create and display the error message in the script?
I'm at a loss with it
Thanks, Daniel Jenkins
Better look at those sample scripts that I suggested. What you show will work and when the user enters data into the input fields, they are already entering search criteria, but this is not how I would set this up.
I really don't know exactly what error message you are asking about in your last post, there are several errors that you might need to deal with here.
I had a look at the sample scripts and constructed the one I explained in my previous post.
When I enter the criteria and hit search, it says that "the provided search criteria is not valid. Enter a valid request before proceeding."
I made a mistake, I was meant to say display a message if no records were found, I know how to do that now but the above issue is something I cannot solve.
But what you constructed is very different from any of the examples in that thread.
Note the use of global fields where the user enters data into them while in Browse mode, then the script enters find mode and uses set field steps to transfer the data from the global fields to the fields used in the search, with calculations used as needed to produce a variety of different search criteria depending on the type of search needed.
So you might write the script like this:
Show Custom Dialog ["Customer Search"; "Enter criteria to search for specific customers."; Customers:: gSurname; Customers::gTelephone Number; gCustomers::Email Address]
If [(Get (LastMessageChoice) = 1)//Ok was clicked]
Enter Find Mode 
Set Field [Customers::Surname ; Customers::gSurname]
Set Field [Customers::Telephone Number ; Customers::gTelephone Number ]
Set Field [Customers::Email Address ; Customers::gEmail Address ]
Set Error Capture [on]
Perform Find 
The fields I've named with a 'g' as the first letter would have to have global storage specified, but can be defined in any table in your file, they do not have to be defined in Customers as I have done here in this example.
I managed to get it correctly functioning without the use of global fields in the end,
One last question, is it possible to have the input fields display a drop down list?
Not in a custom dialog. That's why I also recommended using New window instead of Show Custom Dialog for cases where you need more than simple text input for your data.