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.

How to programmatically select active tab in UI builder

Arch Henderson
Tera Contributor

I'm trying to select a different tab in my Tab Set component, but I cannot find a way to do so. 

The component documentation mentions a 'Select tab index' property, but that property does not seem to exist or is not shown in the configuration panel. There has to be a way to select the active tab, right?

5 REPLIES 5

Kirankumar Amba
ServiceNow Employee
ServiceNow Employee

There is a menu option beside Add button. On click of that, you would see an option to changes Tab Set to Viewport tabs as shown below:

find_real_file.png

 

After that, the configuration panel will have different options as show below, including "Selected tab index" option, which can be programmatically set to change tabs:

 

find_real_file.png

 

Hope that helps!

Thank you!

What if I dont want to use sub pages? I've found passing data into the page from the parent page to be either impossible or completely undocumented. Ie, how can I get a subpage/viewport tab to read Url parameters?

Its impossible to do with the new Tabs sidebar as well.  I want to pass the table/sys_id from my current record into a tab and I can't figure it out.  It is documented that it wouldn't be available --- but why.  Why would I have a sidebar on a record page if I can't reference the existing record?  #frustrated