Grouping rows in tables and adding a row count
Example of groups in a table
If a user clicks a column to sort the table, the rows within the groups are sorted.
To create a table that groups rows and displays a count
- Create a list view table, as described in Adding-a-table-field-to-a-form.
- In the Properties tab, select Sort/Levels property, and click its ellipsis button.
- In the Available Columns list of the dialog box, select the columns by which you want to sort the table data.
Table columns associated with character fields whose input length is more than 255 bytes do not appear in the Available Columns list. - Click the arrow button to move the selected columns to the Sort Order/Tree Levels list.
- Use the Up and Down buttons to set the sort order of the columns or levels.
The field that appears at the top of the list has the highest precedence. - To change the sort direction of a column, click its Sort Direction cell.
Clicking the cell switches the sort direction between ascending and descending. Ascending order for numeric fields means that values such as lower ID numbers or earlier dates appear at the top of the table list. Ascending order for character fields means that requests are sorted alphabetically from A to Z. - To group the table's rows by the data entered in a field:
- If the field is not at the top of the Sort Order/Tree Levels list, move the field to the top.
- For the field you want to use to group rows, click the check box in the Group column.
The field you select appears as a column in the table in Developer Studio, but when the user opens the form in a browser, the field's data become headings for the grouped rows.
For the field by which data is grouped, the following column properties are available but are ignored:- Column Color
- Editable properties
- Enable Sort
- Visibility (must be Visible)
- Width
- Wrap Text
Additionally, the following table properties are not supported for the field by which data is grouped: - Checkbox Column
- Results Color
- To display a count for each group in the table, click the check box in the Count column.
The count appears in the group heading's row.
- Click OK.
- Right-click the form, and select Save.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*