Grouping rows in tables and adding a row count


For forms that users view in a browser, you can group table rows in list view tables. Users can expand these logical groups (or "folders") to view a subset of table rows. The groups are created from the data entered into the field. For example, if you select the Status field by which to organize groups, the rows of the table are grouped by each status option (for example, Draft, Open, Rejected, and so on) as shown in the following figure.

Additionally, you can include a count, which displays how many rows are included in the section.

Example of groups in a table

GroupedTable.gif

If a user clicks a column to sort the table, the rows within the groups are sorted.

Important
  • In Developer Studio, if you enable the Group option for any column by using Table Properties > Columns > Sort Levels, then in a group, only the instance ID is considered for sorting.
  • When you group rows in list view tables, you can set any workflow, except workflow related to table labels and workflow related to collapsing and expanding folders.

To create a table that groups rows and displays a count

  1. Create a list view table, as described in Adding-a-table-field-to-a-form.
  2. In the Properties tab, select Sort/Levels property, and click its ellipsis button.
  3. 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.
  4. Click the arrow button to move the selected columns to the Sort Order/Tree Levels list.
  5. 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.
  6. 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.
  7. To group the table's rows by the data entered in a field:
    1. If the field is not at the top of the Sort Order/Tree Levels list, move the field to the top.
    2. 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
    3. 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.
  8. Click OK.
  9. Right-click the form, and select Save.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*