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
Navigate to All > Service Portal > Widget Instances.
Click the preview time card header icon (
Image omitted: preview-record-icon.png
Preview Time card header icon\) to open the Time Card Portal Main Container widget instance.
Preview Time card header icon\) to open the Time Card Portal Main Container widget instance.
- On the Instance form, update the code by providing values for the following column configurations in the Additional options, JSON format field.
| 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.
- 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}
]
}
}
}
Parent Topic:Time Sheet Portal