Comments on: Changing the Active Tab Selection in ServiceNow https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 20:52:51 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mila Morales https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7558 Thu, 14 Sep 2017 14:59:02 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7558 In reply to Kumarr Satyam.

That is not possible. You can refer to this thread on what methods you can use using g_tabs2Sections:
https://community.servicenow.com/community/develop/blog/2015/07/07/demystifying-form-tabs

]]>
By: Kumarr Satyam https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7557 Thu, 25 May 2017 06:17:03 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7557 Can we change tab name also using g_tabs2Sections ? if yes then what we have to do?

]]>
By: Mark Stanger https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7556 Thu, 30 Mar 2017 16:48:58 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7556 In reply to Rahul Gubbala.

Unfortunately, I’m not aware of anything that can handle this type of thing in the Service Portal scripting API at the moment. I’ll be sure to post that here if there is anything that comes available.

]]>
By: Rahul Gubbala https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7555 Thu, 30 Mar 2017 14:50:24 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7555 Hi Mark,

I’ve been struggling of late regarding the tabbed forms and lists in the service portal. Is there any way that I could use your line of code in the widgets that I use for the portal pages?

Regards,
Rahul.

]]>
By: Mark Stanger https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7554 Wed, 06 Jul 2016 15:38:58 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7554 In reply to Stephanie McCally.

You’re welcome!

]]>
By: Stephanie McCally https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7553 Tue, 05 Jul 2016 18:52:40 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7553 Thank you, this was very helpful and exactly what I was looking for!!

]]>
By: Mark Stanger https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7552 Tue, 05 Jan 2016 17:03:13 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7552 In reply to Michael Sabia.

Thanks for letting me know. You can simply replace ‘h3’ with ‘span’ in the code you’re referencing to make this work in Fuji. I’ve corrected the code in the article above.

]]>
By: Michael Sabia https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7551 Tue, 05 Jan 2016 16:52:27 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7551 The var myTabs = $(‘tabs2_section’).select(‘h3[class=”tab_header”]’); line seems to have stopped working in Fuji. As a workaround, I’m using the following which first locates a tab by looking for a field and then setting focus to that tab

g_tabs2Sections.setActive(g_tabs2Sections.findTabIndex(‘close_notes’));

]]>
By: Mark Stanger https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7550 Fri, 22 Nov 2013 12:03:46 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7550 In reply to Xavier Bob.

The ‘Related Records’ tab is a form section, not a related list I believe. It is also the ‘1’ position by default on the ServiceNow incident form. This should work correctly in a SN demo instance. You’ll have to make sure your configuration matches or adjust the script accordingly.

g_tabs2Sections.setActive(1);

]]>
By: Xavier Bob https://servicenowguru.com/client-scripts-scripting/changing-active-tab-selection-servicenowcom/#comment-7549 Fri, 22 Nov 2013 10:27:14 +0000 https://servicenowguru.wpengine.com/?p=2149#comment-7549 Hey Mark,

If i want the Releated Records tab to be visible on selecting state ‘Awaiting Problem’,shouldnt this work fine if i include only “g_tabs2List.setActive(2);” in my client script…. this isnt working do we have to include the whole script which is provided above

]]>