Search Control

search column
Add page for Search Column

Search Columns enable a user to find data using a basic or advanced search that tie back to netFORUM tables and columns on a Find page. It is easy to add more search columns or to hide search columns that are rarely used or point to columns that you don't work with.

Search controls are tied to a specific Form. Different Forms, even within the same Object, can have a different set of search controls.

Search Controls are also used to develop eWeb search pages using the Find.ascx control.

Adding Search Controls

Search Control fields are added to the search Form in the Toolkit module.

To view or add search controls, use the following steps:

  1. Locate the appropriate Form (Dynamic Form Profile screen) - the easiest way to do this is to use the "Find Form" action in the Toolkit area of iWeb. If you are unsure which form, examine the URL for the FormKey querystring parameter and search for the form by this key. You do not need to design any form to configure the Find page -- it is generated dynamically based on the Search Controls added to that form.
  2. Note: If you have created a substitute form, still go to the root, original form - not the substitute.

  1. Underneath the description and actions boxes, in the tabbed section, use the down arrow to select the "Navigation" tab.
  2. Expand the section called "search columns" if it's not already expanded.
    Note: You should now be able to see the existing search controls.
  3. To add a new search control, do one of the following:
    • Click the Add button at the far right of the "search columns" bar. -or-
    • Click the "add search control" image in the actions bar above (looks like a pair of binoculars)
  4. Select the table, table column, and Control Class. In the Add page, only the primary table is shown in the Table DropDownList; to see all tables, press the show me all tables checkbox.
  5. Click 'Save' - this should bring you back to the form view.
  6. Locate the newly added control in the "search columns" section and click the pencil icon to edit that control.
  7. Specify the following:
    • order - Where in the list the new control should appear. A higher number means later in the list.
    • search field default value - What default value, if any, should be placed in the control. For CheckBoxes, 1 means "checked".
    • search field description - This is the text that precedes the control when the Find form is viewed
  8. Click 'Save' - this should bring you back to the form view.
  9. Finally, confirm that the search control appears with the desired values in the "search columns" section.

Controls

  • Dynamic Form: the form linked to the search column.
  • Table: The database table containing the column on which you want to search. netFORUM will automatically determine the necessary JOIN conditions based on the JOIN conditions configured in the List Table/List From Table definitions. Therefore, you cannot search on a related table unless you have already configured the related table as a FROM TABLE in the List Table setup of the Form's Object's List Table.
  • From Table Alias: The alias of the database table.
  • Table Column: The column on which the user is to search. Most often this is a free text field, but it can also be a DropDownList, Checkbox or TextBoxMultiLine. Note that if the search field is a DropDownList, you can choose the same column that appears on forms as a DropDownList; for example, to search against the Prefix code on Individual, choose the column ind_prf_code. If you a developing a search against the Event table [ev_event], you can configure a search against the Event Type [evt_etp_key] on this column, configured as a DropDownList.
  • Control Class: The visual appearance of the search column. May be TextBox, TextBoxMultiLine, DropDownList or Checkbox. See Control Class.
  • Order: The sort order of the search column, from top to bottom. Search columns used most frequently should be sorted to appear higher up.

The next five Value fields are used to configure the search field as a DropDownList. You will enter values here only if you want to override the default behavior of a column that is configured as a DropDownList in its underlying column definition. See DropDownList for more information about configuring DropDownLists.

  • Value From: The name of the table from which to select values.
  • Value Column: The column against which you want to search.
  • Value Text Column: The clear text value that will appear to the end user in the DropDownList control.
  • Value Where: The WHERE clause filter, if any. You may omit the actual keyword WHERE.
  • Value Order By: The Sort Order. This is nearly always going to be the same as what you enter in Value Text Column.
  • Auto Postback?: Check if you want the column to post back after the user chooses an entry. For example, if you have DropDownList search columns for Country and State, you will probably want a PostBack after choosing Country so that you can re-populate the State DropDownList with a filter on the chosen country.
  • Search Field Default Value: Here you may specify a default value for a DropDownList. For example, if 98% of all records are in the United States, you may want to default the Country DropDownList to that value. If you would like to embed an automatic filter on a search page, then you may enter a default value and then check the hide/disable checkbox. Doing this will include the default value filter on any searches, but not show the search control to the end user. Of course, if you do this, the end user will not have a choice on this, as the filter will always be added to the where clause of the search.
  • Search Field Description: Here you may override the default column description as it is configured in the search column’s definition.