You may specify custom selection criteria. This option is most commonly used when displaying records resulting from a multi-table join where data from several database tables are displayed. Additional filtering criteria may be applied to the multi-table join. For example, you may display a table containing information from the Orders and Customers table, showing only orders greater than $1,000. Or, you might display information only pertaining to the currently signed in user, allowing them to see only their own information.
|
|
|
Use the Add/Edit WHERE Clause dialog to add additional filter criteria. |
Iron Speed Designer automatically generates the SQL query required to join the selected tables together. Any number of tables may be included in the join and any number of joining conditions may be applied to filter the result set. Iron Speed Designer provides a wide variety of ways to create and customize SQL queries.
Using the Table Panel Wizard and the Record Panel Wizard is a great way to add an extra clause here and there. It’s good for “light duty” SQL modification without having to actually write the SQL.
See Joining Multiple Tables with the Panel Wizards.
Creating a custom database view within your database is the best way to proceed if you have a truly custom query. Database views are easy to use and make use of your databases underlying power and ability while letting Iron Speed Designer focus on application generation.
Step 1: In your database, create a database view containing whatever SQL you wish. This can be a simple or complex query – anything you want within the realm of the SQL language.
Step 2: Use the Application Wizard in Iron Speed Designer to create a set of pages for that database view.
Custom queries are a good alternative if, for some reason, you can’t create a database view in your application and the other mechanisms outlined here won’t work for you. For example, the Panel Wizards are too simplistic and you don’t want to hand-code.
Select Databases, New Custom Query… to create a custom query in Iron Speed Designer.
The GetRecords() function is the best alternative if you need to dynamically create SQL at run-time based on what your application is doing. It’s the ultimate in control, but also requires hand-coding.
There are several online help topics covering the GetMethods() function.
The Code Customization Wizard contains a variety of code examples that use the GetRecords() method.
Joining Multiple Tables with the Panel Wizards
Selecting a Constant Value in a WHERE Clause
Selecting URL Parameters in a WHERE Clause