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

Hi @R Rafols not quite - but I have figured it out. Before I could complete the mapping I first needed to create the operation work type and then could map it