Jayarnab Saha
ServiceNow Employee
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 11-27-2020 02:21 AM
OOB Time Sheet Portal, grid section has below columns of time_card table
- 'task.short_description' - To show Task’s name/short description
- 'project_time_category' - Project time category
- ‘rate_type’ - If, Time Sheet Policy has ‘Allow multiple rate types’ enabled
- ‘resource_plan’ - If, resource plan has integrated with Time Sheet and Time Sheet Policy has ‘Update actual hours and cost in resource plan/reports’ enabled
And
- Day fields, Total - I.e. Sunday-Monday and Total hours
You can find this OOB column configuration code in
- Navigate to Service portal -> Widgets Module
- Search with ID tc-grid (Time Card Grid)
- Server Script -> Search for data.fields = defaultHeaderFields;
Now, there is a way to add more time_card columns if required, through following way.
- Navigate to Service portal -> Widget Instances module.
- Search for Time Card Portal Main Container -> Additional options, JSON format -> "header_fields".
- Add the required fields in this array to show in Time sheet grid in between ‘resource_plan’ and ‘day fields’.
- Example : {name:"category",label:'Category', width_in_percent: 10}
- name : time_card’s field name (mandatory)
- label : label to show in column header (optional, by default it fetches fields label as per dictionary)
- width_in_percent : width of the column in % (optional)
- This custom fields will be ordered as per the sequence of objects (Note: OOB columns will be still in same order, only custom fields will be ordered as per this additional option)
Also, this Additional options has “pageSize” config, which defines how many records we want to see per pagination.
N.B. :
- This change will be applicable for all users.
- Inline editing in TCP is only supported for pre-defined columns only, i.e. 'project_time_category', ‘rate_type’, ‘resource_plan’, Day fields. Newly added columns will be read-only. It is recommend to open Form View to edit additional columns.
- 1,836 Views