4.4.3 Displaying tables

This section describes the following items.

In UI version 1.1, you can configure settings for tables displayed in the “Workflow details” window of task and request applications, and in user-created application windows, such as saving table displays and switching display modes. Some applications provided by Ops I include a feature for saving table displays. For a list of these applications, see “(Table) Applications equipped with the table display saving function”.

(1) Saving a table display

This function saves the following table settings changed by users during operation and display the same values the next time the table is displayed.

  • Displayed/hidden status of columns
  • Order of columns
  • Changed column width
  • Sorting status
  • Filter status

NotesNotes

  • This function is not supported in lookup dialog boxes.
  • This function cannot be used for the filter function of the ticket application.
  • Because the settings are saved in the browser, they will revert to the defaults when displayed in other browsers or devices.
  • Saved settings may be lost, for example, when the browser cache is cleared.

Users can configure this function in the workflow details window of the task and request applications, as well as in windows of user-created applications.
This function is set using the rememberViewSettings label in the YAML file for the UI version 1.1. For details, see “UI (UI Version 1.1)”.

The following is a list of applications provided by Ops I that are equipped with this function.

(Table) Applications equipped with the table display saving function

Application Tab Item Applicable to
Request Workflow Tables in windows other than workflow details window
The workflow details window is dependent on user settings.
Ticket Tables of related records (for workflows and tickets) on the ticket zoom window, and service catalogs
Task Workflow Tables in windows other than workflow details window
The workflow details window is dependent on user settings.
Ticket Tables of related records (for workflows and tickets) on the ticket zoom window, and service catalogs
Schedule Work item Applicable to no tables
Resource
Calendar management Calendars
This function is not supported in the filter function.

(2) Displaying arrays

When a table column is configured to contain array values, multiple values are displayed within a single column. By default, values are separated by commas (,). If the displayed text is truncated, click the icon to view the full text.
If you do not want to use a separator, for example, when a comma (,) is used in a role name, you can also display the array column by using the chip component. When using the chip component, specify “chip” in the “type” label. For details, see “(Table) Form properties (UI version 1.1)” and “(Table) Table properties (UI version 1.1)”.


(3) Showing or hiding columns

You can configure whether columns displayed in the table are shown by default.

To hide a column by default, set “hide” to “true”.
For details about the “hide” label, see “(Table) Form properties (UI version 1.1)” and “(Table) Table properties (UI version 1.1)”.


(4) Setting the display mode

You can switch the table display mode. To switch the display mode, specify "client" or "server" in the “mode” label of the following Form and Table components:

  • Form component:
    properties.fields.lookup.mode
  • Table component:
    properties.mode

Specifying "client" loads all records from the specified table and allows them to be sorted and filtered in the browser. Browser-based sorting and filtering improve usability. However, because all records are loaded, it might take some time before they are displayed on the GUI. We recommend using this mode when displaying tables with 1,000 records or fewer.
Specifying "server" retrieves the number of records equal to the number of rows displayed per page (the value of “rowCount”) each time a page is loaded. In addition, records are retrieved from the server each time data is sorted or filtered. We recommend using this option when display takes a long time with the "client" option specified or when displaying tables with more than a few thousand records.
For details about the “mode” label, see “(Table) Form properties (UI version 1.1)” and “(Table) Table properties (UI version 1.1)”.

NotesNotes

If "server" is specified in the "mode" label of the Table component, the GUI cannot detect when the record for the currently selected row in the Table component is deleted, so the selection state is not cleared.
Therefore, we recommend either explicitly clearing the selection when deleting the record within a UI action, or checking whether the record exists before performing operations on the selected record.
You can change the selection state by using an action. For details, see "Action scripts (UI Version 1.1)".


(5) Changing user and group information retrieved from lookup fields

When lookup fields are used to specify users or groups, the user or group information available through the API is shown below:

  • User or group attributes in the lookup dialog box
  • Field display name

For details about the user and group information available through the API, see the following sections under “Detailed API Reference Information > Standard API Functions” in the “JP1/Operations Integration API Reference”.

  • API Details: Details of the “GET /users/{id}” response (“dtos.UserDTO”)
  • API Details: Details of the “GET /groups/{id}” response (“dtos.GroupDTO”)

For details about the items displayed in lookup fields used to specify users or groups when the API is not used, see “(Table) user table” and “(Table) group table”.

When using the API, configure the settings as follows:

  1. Configure the "dataSource.apis" setting
    Set the "dataSource.apis" label.

    (Table) dataSource.apis settings
    Label Setting values
    apis:
    - name: Specify a user-defined name.
    This is used when a component references the setting. The name must be unique within the "apis" label.
    api: Set the following values:
    • For users:
      user:UserList
    • For groups:
      group:GroupList
    When specifying "user:UserList", set the "include.kind" label to "api" and the "include.name" label to "user_apis". When specifying "group:GroupList", set the "include.kind" label to "api" and the "include.name" label to "group_apis".
    parameters: Configure this setting if you want to sort or filter the displayed data in advance, or if you want to display data for billing users or non-billing users.
    - name: Specify one of "sortBy", "filterBy", or "subscribed"*:
    • sortBy:
      Specify this to sort the displayed data in advance.
      Example: To display data in descending order by creation date and time
      - name: sortBy
        type: fixed
        value: createdOn:desc
    • filterBy:
      Specify this to filter the displayed data in advance.
      Example: To display users whose company name is hitachi
      - name: filterBy
        type: fixed
        value: company:eq:hitachi
    • subscribed:
      Specify this to select and display billing or non-billing users.
      Example: To display billing users
      - name: subscribed
        type: fixed
        value: true
    parameter:
    type: Specify "fixed".
    value: Specify a fixed value.
    For values that can be specified, see "GET /users" and "GET /groups" under "Detailed API reference information > Standard API functions" in "JP1 Cloud Service/Operations Integration API Reference".
    origin: Specify "content".
    *For groups, "subscribed" cannot be specified.

  2. Configure the "lookup" label in the Form component
    Create a Form component that includes a "lookup" label, and reference the API from the "lookup" label.

    (Table) Lookup label settings in the Form component
    Label Setting values
    displayName: Set the column name to be displayed in the following format:
    Value of dataSource.apis.name.column_name
    lookup:
    mode: Specify either "client" or "server".
    We recommend specifying "server".
    field: Set the ID in the following format:
    Value of dataSource.apis.name.id
    labelQuery: No definition is required because change from the default value is unnecessary.
    columns: Specify the columns to be displayed in the lookup dialog box.
    column: Specify the columns to be displayed in the lookup dialog box in the following format:
    Value of dataSource.apis.name.property_name
    source: Specify "api".

For items not listed here, see “(Table) Form properties (UI version 1.1)” and configure them accordingly.


<Definition example>

  • dataSource.apis definition examples
    includes:
      - kind: api
        name: user_apis

    dataSource:
      - name: searchUser
        api: user:UserList
        origin: content
        parameters:
          - name: filterBy
            parameter:
              type: fixed
              value: department:eq:OPF

  • Definition example of the "lookup" label in the Form component
    - name: test_form
      type: form
      properties:
        fields:
          - name: user
            source: schema
            field:
              all: test_form_schema.user
            label: user
            properties:
              xs: 12
              sm: 12
            displayName: searchUser.username
            lookup:
              mode: server
              field: searchUser.id
              columns:
                - name: username
                  column: searchUser.username
                  label: user name
                  source: api
                  filterable: true
                  sortable: true
                - name: email
                  column: searchUser.email
                  label: email address
                  source: api
                  filterable: true
                  sortable: true


(6) Displaying multiple tables in a joined view

You can display multiple tables in a joined view.
For details, see “Types of datamodels”.