Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

Add columns to the logged time card list

Log in to subscribe to topics and get notified when content changes.

Add columns to the logged time card list

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 Service Portal > Widget Instances.
  2. Click the preview time card header icon (Preview Time card header icon) to open the Time Card Portal Main Container widget instance.
  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}
      ]
    }
  }
}
Feedback