Professional Documents
Culture Documents
Introduction
One of the most frequently asked questions on Spry Data Utilities Toolkit is "How to use
Spry Search with multiple search fields?".
The short answer is this: You have to do it EXACTLY the same way as you would without
Spry.
The steps are as follows:
1. Add all the form fields required to filter your Recordset.
2. Set up your Recordset to select records based on the values from those fields.
As you can see this view allows you specify a single search field only.
2. Click "Advanced" button to switch to the Advanced view.
Once in the Advanced view click the "+" button right above the Variables list
to add a new variable.
Enter a unique name in the Name field, select Text as the Type (because last
name is just a piece of text, not date or number). Enter some impossible value
in the Default value (this is to make sure that search is not triggered without
invoking it by user) - "-1" is a good choice.
Finally specify the Runtime value. The pattern is $_POST['field_name'] where
field_name is the name of your search field.
In our case it's Last_Name:
This is PHP syntax. If you are using ASP the syntax for the Runtime value
would be Request.Form("Last_Name").
For ColdFusion the Runtime value is not being specified and the dialogs would
look slightly different.
3. Click OK and the variable will appear in the Variables list:
Use the patterns described above to add more fields/variables to your search if
required.
We are searching for a match where the value in event_date column is between colname
AND colname2.
Variable are also being set up in slightly different way.
Here is the PHP example:
As you can see the Type is set to Date. Runtime value, of course, is set to the name of the
corresponding field. In this case is $_POST['Date_From'].
ASP Example:
Conclusion
Hopefully you have found this tutorial to be useful. More information on working with
advanced recordsets can be found in Dreamweaver Help. You can access it by clicking Help
button in the Advanced view of