Add columns to the logged time card list

  • Release version: Xanadu
  • Updated August 1, 2024
  • 1 minute to read
  • Add columns in the logged time card list on the Time Sheet Portal to show additional information that you might require to log your time cards.

    Before you begin

    Role required: admin or sp_admin

    About this task

    Procedure

    1. Navigate to All > Service Portal > Widget Instances.
    2. Search the Widget column for Time Card Portal Main Container and open the record.
    3. On the Instance form, update the code by providing values for the following column configurations in the Additional options, JSON format field.
      Table 1. Instance form
      Column configuration Description
      name Name of the column in a table.
      label

      Column name to display in the logged time card list on the Time Sheet Portal.

      The configuration is mandatory if you are adding a column of a table other than the Time Card [time_card] table.

      width_in_percent Column width in percentage in the logged time card list.
      Note:
      To add more than one column, separate each column configuration with a comma. The columns are added in the same order as you add them in the code.
    4. Click Update.

    Example

    The following sample code adds the category column of the Time Card [time_card] table with the column name Category and width of 10% in the logged time card list on the Time Sheet Portal.
    {
      "tm_grid_options": {
        "displayValue": "Time card grid options",
        "value": {
          "header_fields": [
            {name:"category",label:'Category', width_in_percent: 10}
          ]
        }
      }
    }