Customizing the Search Part
This topic continues to describe the process of creating a grid component.
If you checked Grid contains a 'Search' part in Selecting the Grid Component Type.
Display the Search Fields page.
Select one or more
fields from the Available Fields list and click
to move them to the Fields to Search
In list.
Optionally, use
the
,
,
and
buttons to reorganize the sequence of selected fields.
Optionally, change their Display Settings > Control type values from "Textbox" to another control type. Refer to Setting Grid Component Control Properties for more information about setting control properties.
Optionally, change the Display Settings > Search style value. If this value is 0, then the search part uses the search style defined on the Search > Properties menu. Other values will override the search style for this control (V7).
If you want to provide two inputs for a field that define low and high values for a range search, select "True" in the Display Settings > Range search list *. Optionally, redefine the Display Settings > From label and Display Settings > To label prompts (V7).
Optionally, display the Search > Properties menu ( see below ).
Click
to preserve your work.
If you do not need
to define Detail View properties, click
Browser
to see the grid running in your browser.
Note : Alpha Five
indexes compatible with Lightning
Query Optimization will speed up grid searches.
When you build a new grid component and add a search form, you have several options for the display of these components.
show both grid and search form all the time
show the grid all the time but hide the search form until it is needed
show the search form all the time but hide the grid until it is needed
hide the grid when showing the search form and hide the search form when showing the grid
Check the Hide Grid Part Options > Hide Grid when no search active if you would like to hide the grid until a search is performed.
If the grid is hidden,
optionally click
in the Hide Grid Part
Options > Text to display when grid is hidden. This opens the
HTML Editor, where you can create the text to
display.
|
Category |
|
Options and Description |
|
Hide grid when no search active |
V6 |
This option allows you to hide the grid until the search finds one or more records.
tmpl.search.HideGridWhenNoActiveSearch as L |
|
Text to display when grid is hidden |
V6 |
Define the text to display when the grid is hidden.
tmpl.search.GridHTMLWhenHidden as C |
Optionally, select the Search Options > Show title field.
If the prior field is selected, you may change the title text that appears in the Search Options > Title field. This is an HTML text field and may contain HTML formatting.
Optionally, select the Search Options > Enable Show/Hide of Search part field. When selected, the search form is hidden until you click on the search link.
Optionally, change the text of the search form link in the Search Options > Title when hidden field.
Optionally, change the initial state of the search form in the Search Options > Initial state field.
Optionally, change the search button label in the Search Options > Search button label field.
Optionally, specify how the search fields should be laid out in the Search Options > Orientation field.
Specify whether you want a clear search link button in the Search Options > Has 'Clear Search' link field.
Specify the type search to perform in the Search Options > Search style field.
Specify whether you want to search for all grid fields using a single search form field in the Search Options > Show single 'Keyword' search field.
Specify whether you want to allow Query by Form syntax in the Search Options > Allow 'Query by Form' syntax field.
Specify how to process multiple search criteria in the Search Options > Combine search criteria using field.
|
Category |
|
Options and Description |
|
Show title |
V6 |
Enables or disables the title above the Search part.
tmpl.search.show_title as L |
|
Title |
V6 |
Defines the title of the Search part and may contain HTML formatting.
tmpl.search.title as C |
|
Title when hidden |
V6 |
Sets the text of the link to display when the search form is hidden and may contain HTML formatting.
tmpl.search.title_when_hidden as C |
|
Enable Show/Hide of Search Part |
V6 |
Enables or disables the user's ability to click on the Search part's title to hide or show the Search part.
tmpl.search.EnableShowHide as L |
|
Initial state |
V6 |
Sets the initial state of the Search part when the page is displayed. The options are:
tmpl.search.InitialState as C |
|
Search button label |
V6 |
Specifies the label for the Search button and may not contain HTML formatting.
tmpl.search.search_button_label as C |
|
Orientation |
V6 |
Specifies how the Search controls are laid out. The options are:
tmpl.search.orientation as C |
|
Has "Clear Search" Link |
V6 |
Specifies whether the Search part has a link to clear the search criteria and requery showing all records.
tmpl.search.has_Clear_link as L |
|
"Clear Search" Label |
V6 |
Specifies the text to show on the "Clear Search" link and may contain HTML formatting.
tmpl.search.Clear_link_Label as C |
| V6 |
Specifies the type of search to perform. The options are:
tmpl.search.style as N | |
|
Show single "Keyword" search field |
V6 |
Enables or disables a single search control instead of showing individual search controls. If a match is found any of the search fields, the record is returned.
tmpl.search.show_single_search_field as L |
|
Allow Query by Form syntax |
V6 |
Enables or disables support for Alpha Five's QBF syntax. For example: CA,MA to search for "CA" and "MA", 123..345 to search for >=123 and <=345, ..12/3/2004 to search for dates <=12/3/2004.
tmpl.search.allow_qbf_style as L |
|
Combine search criteria using |
V6 |
Specifies how to process multiple search criteria if a user enters search criteria into multiple controls'. The options are:
tmpl.search.combine_criteria_using as N |
|
Keyword search label |
V6 |
Specifies the label of the Search label and may contain HTML formatting.
tmpl.search.keyword_label as C |
Optionally, specify whether you want a sorting listbox on the search form in the Sort Options > Include 'Sorting' listbox field.
Optionally, specify the label for the sorting listbox in the Sort Options > Label for 'Sorting' listbox field.
Optionally, define the label for the inline style for the sorting listbox in the Sort Options > Inline style for 'Sorting' label field.
Optionally, specify the option to show in the sort listbox when the user has not selected a value in the Sort Options > 'Sort' listbox default field.
Optionally, specify the options to show in the order listbox in the Sort Options > 'Order' listbox options field.
Optionally, specify the option to show in the order listbox when the user has not selected a value in the Sort Options > 'Order' listbox default field.
|
Category |
|
Options and Description |
|
Include Sorting list box |
V6 |
Specifies whether the Search part includes a list box to allow users to select the sort order for the data.
tmpl.search.include_sorting_listbox as L |
|
Label for Sorting list box |
V6 |
Specifies the label that appears to the left of the Sorting list box.
tmpl.search.sort.prompt as C |
|
Inline style for Sorting label |
V6 |
Specifies style attributes that are used when a validation
error occurs. Click
tmpl.search.sort.promptInLineStyle as C |
|
Sort list box default |
V6 |
Specifies the text to show in the Sorting list box when the user has not selected a value.
tmpl.search.sort.listbox.fieldname_prompt as C |
|
Order list box options |
V6 |
Specify the text for the choices that appear in the Order list box. The entries are:
tmpl.search.sort.listbox.order_choices as C |
|
Order list box default |
V6 |
Specifies the text to show in the Order list box when the user has not selected a value.
tmpl.search.sort.listbox.order_prompt as C |
Records per Page Listbox Options
Optionally, select the Records per Page Listbox Options > Include 'Records per Page' listbox field. If the prior field is selected, the next four fields are enabled.
Optionally, change the label for the listbox in the Records per Page Listbox Options > Label for 'Records per Page' listbox field.
Optionally, change the inline style of the listbox label in the Records per Page Listbox Options > Inline style for 'Records per Page' listbox label field.
Specify the choices to display in the listbox label in the Records per Page Listbox Options > 'Records per Page' listbox choices field.
Specify the option to show in the listbox when the user has not selected a value in the Records per Page Listbox Options > 'Records per Page' listbox default field.
|
Category |
|
Options and Description |
|
Include Records per Page list box |
V6 |
Specifies whether the Search part includes a list box to allow users to select the number of records per page to display.
tmpl.search.include_records_per_page_listbox as L |
|
Label for Records per Page list box |
V6 |
Specifies the label that appears to the left of the Records per Page list box.
tmpl.search.records_per_page.prompt as C |
|
Inline style for Records per Page label |
V6 |
Specifies style attributes that are used when a validation
error occurs. Click
tmpl.search.records_per_page.promptInLineStyle as C |
|
Records per Page list box choices |
V6 |
Specify the choices that appear in the Records per Page list box. Enter a comma delimited list of values. For example: 1,5,10
tmpl.search.records_per_page.listbox.choices as C |
|
Records per Page list box default |
V6 |
Specifies the text to show in the Records per Page list box when the user has not selected a value.
tmpl.search.records_per_page.listbox.value_prompt as C |
Optionally, add HTML text above, below, to the left, and to the right of the search form in the Freeform Edit Regions fields.
|
Category |
|
Options and Description |
|
Above grid |
V6 |
Defines HTML that appears above the search form.
tmpl.EditRegion.Search.Top = <<%txt% ' code here %txt% |
|
Below grid |
V6 |
Defines HTML that appears below the search form.
tmpl.EditRegion.Search.Bottom = <<%txt% ' code here %txt% |
|
Left of grid |
V6 |
Defines HTML that appears to the left of the search form.
tmpl.EditRegion.Search.Left = <<%txt% ' code here %txt% |
|
Right of grid |
V6 |
Defines HTML that appears to the right of the search form.
tmpl.EditRegion.Search.Right = <<%txt% ' code here %txt% |

A search form that uses a single keyword field to search across five different fields [Picture]
|
Category |
|
Options and Description |
|
Control type |
V6 |
The type of control to use. The options are:
tmpl.SearchField_Info[N].controltype as C |
|
Display format |
V6 |
An expression that formats the data in the field. |
|
Search expression |
V7 |
This field is automatically defined. It defines the
SQL equivalent to a "calculated" field returned by a SQL Select
statement. Assume the SQL Select statement for a grid
is: |
|
Range search |
V7 |
When checked, displays two fields in the search form to accept high and low values.
tmpl.SearchField_Info[N].RangeSearch as L |
|
From label |
V7 |
The label that appears above the "From" field in a range search.
tmpl.SearchField_Info[N].FromLabel as C |
|
To label |
V7 |
The label that appears above the "To" field in a range search.
tmpl.SearchField_Info[N].ToLabel as C |

A search form that uses two fields to set low and high values for a range search [Picture]
|
Category |
|
Options and Description |
|
Inline style |
V6 |
Sets style properties for cell borders.
tmpl.Search.TableInLineStyle as C |
|
Table tag attributes |
V6 |
Optional arguments to insert into the Search part's <table> tag. These tags are in addition to the existing table tags. as a result, not all tags can be added in this manner.
tmpl.search.TableAttributes as C |
|
Category |
|
Options and Description |
|
Choices |
V6 |
Click |
|
Orientation |
V6 |
The orientation of the label. The choices are:
tmpl.SearchField_Info[N].CheckBox.Orientation as C |
|
In – line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N].CheckBox.InLineStyle as C |
|
Not in list rule |
V6 |
Specifies the value to set if the user input does not match a specified choice. The options are:
tmpl.SearchField_Info[N].CheckBox.NotInListRule as C |

A search field with individual search fields, including a calendar control and check boxes dynamically populated with unique record values [Picture]
|
Category |
|
Options and Description |
|
Choices |
V6 |
Defines the choices the appear in the control. Click
|
|
Height |
V6 |
Set the height of the label in lines. The default is 1, which produces a combo box. Values larger than 1 produce a list box.
tmpl.SearchField_Info[N].DropdownBox.Size as N |
|
In – line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N].DropdownBox.InLineStyle as C |
|
Multi-select allowed |
V6 |
Defines whether the user can select more than one value. Multiple values are ORed together, so that any single value can be True. The options are:
tmpl.SearchField_Info[N].DropdownBox.selectStyle as C |
|
Not in list rule |
V6 |
Specifies the value to set if the user input does not match a specified choice. The options are:
|

A search field with a list box populated dynamically with unique record values and a freeform layout that combines the Price and Quantity fields in one cell [Picture]
|
Category |
|
Options and Description |
|
Choices |
V6 |
Click |
|
Orientation |
V6 |
The orientation of the label. The choices are:
tmpl.SearchField_Info[N].RadioButton.Orientation as C |
|
In – line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N].RadioButton.InLineStyle as C |
|
Maximum choices |
V6 |
Specifies the number of choices to display.
tmpl.SearchField_Info[N].RadioButton.maxchoices as N |

A search field with radio buttons dynamically populated with unique record values [Picture]
|
Category |
|
Options and Description |
|
Hide row |
V6 |
Specifies whether to display this row. The field may still appear in a freeform layout.
tmpl.SearchField_Info[N].Column.Hide as L |
|
Row label |
V6 |
The label to the left of the field.
tmpl.SearchField_Info[N].Column.Heading as C |
|
Row label in-line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N].Column.InLineStyle as C |
|
Row label position |
V6 |
The position of the label in relationship to the control. The options are:
tmpl.SearchField_Info[N].Column.LabelPosition as C |
|
Label prefix |
V6 |
Text to be displayed to the left of the row label.
tmpl.SearchField_Info[N].Column.Heading_Left as C |
|
Freeform layout |
V6 |
Specify if this column or row should display just this field, or allow a free-form layout.
tmpl.SearchField_Info[N].Column.Type as C |
|
Freeform layout |
V6 |
The HMTL code to execute.
tmpl.SearchField_Info[N].Column.Type as C tmpl.SearchField_Info[N].Column.FreeFormTemplate = <<%html% ' code here %html% |
|
Cell in-line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N].Column.InLineStyle as C |
|
Bubble Help Text |
V8 |
Optionally, set an initial value for the control to display.
tmpl.Variable_Info[N].BubbleHelp as C |
|
Label Bubble Help Text |
V8 |
Optionally, set an initial value for the control to display.
tmpl.Variable_Info[N].BubbleHelpLabel as C |
|
Break Type |
V8 |
When the number of layout columns is greater than 1, this property helps position controls by starting a new row before or after them:
tmpl.Variable_Info[N].Breaktype as C |
|
Column Span |
V8 |
When the number of layout columns is greater than 1, this property sets the number of columns to group together.
tmpl.Variable_Info[N].nCols as N |
|
Security groups |
V8 |
The names of the groups permitted or denied access to this field.
tmpl.Variable_Info[N].Column.SecurityGroups as C |

A search form with the optional Records per page selection list [Picture]
|
Category |
|
Options and Description |
|
Rows |
V6 |
Sets the height of the control by specifying the number of rows.
tmpl.SearchField_Info[N]. TextArea.Rows as N |
|
Columns |
V6 |
Set the width of the control by specifying the number of columns.
tmpl.SearchField_Info[N]. TextArea.Cols as N |
|
In – line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N]. TextArea.InLineStyle as C |

A search form with the optional Sort Direction selection list [Picture]
|
Category |
|
Options and Description |
|
Size |
V6 |
Sets the width of the field in characters.
tmpl.SearchField_Info[N]. Textbox.Size as N |
|
MaxLength |
V6 |
Sets the maximum length of the user's input in characters.
tmpl.SearchField_Info[N]. Textbox.MaxLength as N |
|
In – line style |
V6 |
Specifies style attributes that override the settings
inherited from the style sheet. Click
tmpl.SearchField_Info[N]. Textbox.InLineStyle as C |
|
Style control if error |
V6 |
Specifies whether to apply a second style to the field if a validation error occurs (V6 only). |
|
Control In – line error style |
V6 |
Specifies style attributes that are used when a validation
error occurs. Click
tmpl.SearchField_Info[N].Column.InLineStyle as C |
See Next
Supported By
Alpha Five Version 6 and Above
Limitations
Web publishing applications only.