Search forms are used to enter values into controls to search and retrieve records from a database. Search forms are used in conjunction with grid or record forms. The search form is used to submit the search criteria and the grid or record form displays the retrieved records that match the search criteria.
The Search Builder can create complex search forms that determine the number of records to be displayed per page, the order the records are displayed and the SQL operator to be used to perform the search. To begin the process of creating a search form, click on the Search Builder option in Builders tab.
Select or create the database connection for the search. You can select one of the existing database connections, create a new connection or select one of the sample databases.
|Use an existing database connection||Select previously configured database connection.|
|Create...||Create a new database connection.|
|or select a sample database (Internet/Intranet)||Use one of the example databases provided with CodeCharge Studio as an alternative to selecting an existing database connection.
If this option is selected the database connection will be created automatically.
|Internationalized||Create internationalized version by using resource translation keys in place of text.|
|Save builder options||Preserve the options selected in steps 1 through 4 of the builder. The options will be automatically pre-selected the next time you use the Search Builder.|
Click Next to proceed to step 2.
This is the main step and involves selecting fields to be shown in the form and other display options.
|Table||Database tables whose fields will be used in the search form.|
|Sorting list box||Gives the search form two list-boxes for sorting. The first will contain a list of all the available fields so that the user can select the field to sort by. The second list-box will indicate the desired sort order (ASC, DESC).|
|Records per page list box||The search form will have a list-box that can be used to specify the number of records to be returned per page.|
|Orientation||Specifies vertical or horizontal orientation of the search form.|
|Advanced...||Click this button to specify the advanced search option such as a submit method, type and other provided options. If the ‘AND’ condition is selected, the search form will contain an input control (textbox or listbox) for all selected database fields.
If the ‘OR’ condition is selected, the search form will include only one textbox control and a value entered into the textbox will be used to search against all selected database fields. Alternatively, you can choose the “Advanced Search” option which creates a single textbox, while also automatically adding a listbox with search options, so that users can specify whether they want to search for “Any Words”, “All Words”, or “Exact Phrase”.
|Available Fields||This list-box shows all the fields available in the table or view.|
|Search Fields||These are the fields to be shown in the search form. They are selected from among the Available Fields.|
|Select an Available Field then click this button to add it to the form.|
|Click this button to add ALL Available Fields to the form.|
|Select a form field then click this button to remove it from the form.|
|Click this button to remove all fields from the search form.|
|Select a form field then click this button to move it upwards in the order of appearance.|
|Select a form field then click this button to move it downwards in the order of appearance.|
|Control Type||Control type to be used for each of the fields in the form.|
Click Next to proceed to step 3.
Select a page and a grid form to which the search will apply. You can skip this step if the form is not yet available or you intend to use the search form for a different purpose.
|Add template panel||Insert Search inside Template Panel. This option available only on pages with Designs. Read more...|
Click Next to proceed to step 4.
Select a style to be used to display the form.
Click Finish to close the builder and generate the search form.