Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Time Card Portal: how to set default tab to Other

Community Alums
Not applicable

Context:

I have a widget / UI question. By default, the task selector in the Time Card Portal has 3 tabs, with Task and its items showing up:

find_real_file.png

 

I would like the "Other" tab and its contents to show up on default / page load, like this:

find_real_file.png

 

In the widget timecard-task-selector, I commented out the elements in the unordered list so that "Tasks" and "Group Tasks" are hidden. However, the cards are still populated with items for "Task", like this:

find_real_file.png

 

Question: Is there a way for me to make this widget show "Task work" and "Out of office" from the "Other" tab by default / on load?

1 ACCEPTED SOLUTION

Community Alums
Not applicable

I found out the solution. In the HTML, I should add class="active" to the <li> and <div role="tabpanel"> elements for the tab that I wanted to render first:

find_real_file.png

View solution in original post

6 REPLIES 6

Community Alums
Not applicable

I found out the solution. In the HTML, I should add class="active" to the <li> and <div role="tabpanel"> elements for the tab that I wanted to render first:

find_real_file.png

adityad
Tera Contributor

I have a related question. How do we update this "Others" list? I just want to display few items rather then everything we see OOTB. I see that you have already achieved it so would be really helpful if you could guide. 

R Rafols
ServiceNow Employee
ServiceNow Employee

Navigate to the list of time card categories and set them to "Inactive" = true

https://<your_instance>/nav_to.do?uri=sys_dictionary.do?sys_id=dde3f0bf8329b91013509c547daad319%26sy...

 

Capture.PNG

Thank you @R Rafols - I had the same question as adityad - I have set the time card categories to "Inactive" = true.

My next question is after I had done the above I also need to create custom categories. I have done this but how do I map the new / custom time card categories on the Time Card Category Maps table?

 

BiancaK_0-1714142365830.png