UI Builder - Redirect from one tab to another tab on same page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I have created a page that contains multiple tabs.
First tab contains few buttons like incident, change etc. Second tab contains a list menu with records beside it.(similar to list page).
When a user clicks on the button on first tab, the page should be redirected automatically to second tab and select the right list id.
Tab 1 : (Overview)
Tab 2 : Events
How can i achieve this in UI builder? I do not see open tab/switch tab options in the event handler.
@Maria Gabriela @Michael Fry @Michael Fry1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15m ago - last edited 14m ago
I found the solution for this.
https://www.servicenow.com/community/next-experience-articles/how-to-switch-the-selected-tab-in-a-ta...
Using above article from @Jon G Lind, I am able to achieve switch tab functionality. Similarly, i created another client state parameter to hold the list id that should be selected.
So, I added two events on the button, one to set the client state parameter 'activeTab' to select the active tab.(it should be set as "id={tab_name}" and not "{tab_name}"). Another one 'selectedListID' to set the list id that should be selected.(this is just sys_id of the list).
Then added the dynamic data binding for tab component as well as the list menu component.
Tab component - The selected tab property in config panel is dynamically binded to client state parameter. 'activeTab' Also added another event handler to this component to update 'activeTab'.
List menu component - The selected list id property in config panel is dynamically binded to client state parameter 'selectedListID'.
