Creating a tabular view of record instances by using a record grid
A record grid is a built-in view component available in the View designer. The record grid component provides the following features:
Displays the record instances in a tabular format on the user interface of the deployed application.
Displays the fields of the associated record definition on the user interface of the deployed application.
Enables users to sort the rows in a grid.
Enables users to filter the values in the grid and display only the rows that match the filter condition.
Enables users to filter rows by cell selection.
Edit multiple records at a time.
Switches to the card layout when the width of the grid is smaller than the configured card layout width.
Download attachments if the record grid has a column bound to an attachment field. Download the attachment by clicking on the file name.
You cannot download attachments from external records.
You can add a record grid while creating a view or while editing an existing view definition.
The following image shows a sample record grid in a browser:
Sample record grid using column layout:
Sample record grid using card layout:
Application business analysts can customize the objects developed in their own applications and that are marked customizable by the developers, but cannot customize the objects developed in com.bmc.arsys. For example, objects in core BMC applications like Foundation, Approval, and Assignment cannot be customized.
To add a record grid to a view definition
- Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
- Select the application to which you want to add a record grid.
- On the Views tab, click the name of the view definition to which you want to add a record grid.
- From Palette, drag the Record Grid element to the canvas as you want it to appear on the user interface.
In Properties, click, and complete the fields in different sections as described in the following table:
Field Actions Mode Select a mode in which you want the record definition to be displayed. If you select the Record mode, complete the following fields:
- Record Definition Name—Select a record definition that you want to display in the view definition.
You can also select a form created in BMC Remedy Developer Studio by using the All Records tab.
If you select the Association mode, complete the following fields:
Record Definition to Show—Select a record definition that must be displayed in the view definition.
Association to Use—Select an association (relationship) with the record definition.
Associated Record ID—Specify the ID of the record that you associate.
(Optional) Associated Role Name—Specify the role name of the record in an association.
When you provide the role name, the view component displays the associated record instances that match the role name. Otherwise, the view component displays all the associated record instances.
Note: The Associated Role Name field is displayed only when you select a many-to-many association in the Association to Use field.
Enable Row Selection Select the toggle key if you want to want to enable users to select single or multiple rows in the application user interface. Initial Sort Column Specify the column with which the record instances will be sorted initially before the application is deployed. You can select the column and whether you want to sort the column in an ascending or descending order. By default, no column is selected. For example, if you select the Display ID column and set the sorting in ascending order, at runtime the records in the Display ID columns are soretd and will be displayed in ascending order. Add/Remove Grid Columns Define the columns that will be displayed by default on the deployed application. You can add or remove the columns on the record grid by selecting the available fields from the record definitions and from the associated record definitions. Card Layout Width Defines the width of the record grid view component at which the column layout switches to card layout. FILTERS
- Select Enable Filtering to enable column filtering within the record on the application.
- Initial Filters provide the filters that are applied to the application at runtime to display only those record fields that match the filter condition. You can select one of the following options:
- Basic—You can select values from the list of available filters to create a filter condition. See also, Filter the record grid with partial strings
- Expression—You can build an expression, such as the view component properties, keywords, view input parameters, or static values to create a filter condition.
- Record Definition Name—Select a record definition that you want to display in the view definition.
Edit the column properties and click Save. You can modify the following column properties:
Property Description Column header Specifies the header of the column. By default, the field name is displayed as the column header. If required, modify the column header. Visible by default Displays the column on the view by default. Sorting enabled Enables sorting of the column at runtime on the deployed application. Filtering enabled Enables filtering of the columns at runtime on the deployed application. Make column value as action button Configures the column value as an action button. To add an action, click Add/Remove Actions and add the actions.
You can also edit the properties for the fields by using the edit option on the fields.
- (Optional) You can add the action buttons to the record grid. To add an action button, drag-and-drop the action button to the Drop Action buttons here area on the record grid and enter the properties of the action button.
- (Optional) You can build an expression, such as the view component properties, keywords, view input parameters, or static values. To build an expression, from the Initial Filters list, click Expression > Click to build an expression. From the list of available values, select the values that you require and then click OK. For more information, see Using the Expression Editor.
- Save the view definition.
To verify the record grid, preview the view definition.
Filter the record grid with partial strings
You can use partial strings to filter records by using the new wild card character '%'. The following table shows you how to search for a partial string using the wild card character.
Desired filter value
What to type in the Filter
|Records shown after applying the filter|
Just the string, Smith
|Records with values that exactly match Smith|
A string that starts with Smith
|Records with values that start with Smith|
|A string that ends with Smith||%Smith||Records with values that end with Smith|
|A string that contains Smith||%Smith%||Records with values that contain Smith|
|The below are unusual cases but are provided just in case the desired filter string contains the wild card character '%'|
Just the string, Smith%
|Records values that exactly match Smith%|
Just the string, Smith\%
|Records with values that exactly match Smith\%|
If you want to search for % and \ characters, you must escape them by using the \ (backslash) as shown in the table above. For more information, see To create the initial basic filters.
Example 1: To add associations to a record grid
Consider your application uses three record definitions such as Ticket, Company, and Support Group. The record definition Ticket is associated to Company and Support Group record definitions by using the following associations with the cardinality of the association as many-to-one:
- Ticket to Ticket (many-to-one)
- Ticket to Company (many-to-one)
- Ticket to Support Group (many-to-one)
Add the columns from the associated record definitions to the record grid. For a detailed step-by-step procedure, see To add a record grid to a view definition.
Use this example to add Company Name and Group Name fields from the associated record definitions to the record grid.
Example 2: To enable editing of multiple records in a record grid
You can enable editing of multiple records in a record grid by using the Edit Records action. This causes a built-in dialog to appear that allows the user to specify values to be applied to all selected records. The fields that cannot be edited across the selected rows do not appear. The record editor updates only those records that are visible in the grid. For example, if there are 50000 records loaded in the record grid, but only 50 records are visible in the viewport, the record editor edits and updates only those 50 records that are visible in the viewport.
To enable editing of multiple records in a grid, add an action button to the record grid and label it. For more information on how to edit multiple records in a grid, see Configuring actions by using an action button.
In the deployed application, the end user can edit multiple records as follows:
To create the initial basic filters Example 3:
Create initial basic filters to display only the records that match the filter condition during runtime. For a detailed step-by-step procedure, see To add a record grid to a view definition.
Use this example to create an initial basic filter to display records assigned only to particular users. However, these filters can be used to filter any record type.
- In Properties, click
and then click Filter.
- In Available Filters, expand Assignee, type in the assignee name, and press Enter.
For example, type Smith and %son. By using the % wildcard, you can filter all the records that fully or partially match the text string entered by you.
To add multiple assignee names, press Enter and type the name of the assignee.
- Click Apply.
The basic filter for the grid is now set.
- Click Preview to view the record grid with the filtered rows.
The record grid displays only those records that are assigned to the users named Smith and the users whose names end with son.
Example 4: To create the initial expression filters
Create initial expression filters to display only the records that match the filter condition during runtime. For a detailed step-by-step procedure, see To add a record grid to a view definition.
Use this example to create initial expression filter to display tickets created by Company A.