Hi all,
I'm trying to set the current view (tab) in a tabbed container that is in a module.
When I debug in the module itself, I'm getting an undefined when doing settingsContainer.setCurrentViewIndex(1).
And when I', doing ['settings3::settingsContainer'].setCurrentViewIndex(1), the setCurrentViewIndex is not a valid function on the object.
Anyone has a clue how to achieve this?
Hey @Maartenvdv,
If I understood correctly you have the tab module inside an app and are trying to change the tab inside the module from the app?
If so,
- create a new input on your module (
tab_index
) and set the default value to 0
- create a new JS query that sets the index of the table based on the input of the module
- create a new JSON SQL query with the trigger to automatic change and set it to:
select 1 from {{tab_index}}
- add the JS query to the success handler event of your JSON SQL query
- In your app (where you have the module embedded) change the input to whatever tab index you need.
That should work.
Hi @Maartenvdv cc @minijohn
Assume given the date you've found a solution. I came across this post this morning while trying to do something similar - basically set the active/visible/current tab when one of a set of buttons is clicked.
I was able to just use myTabs.setCurrentView("index text");
- as long as the tab has an index set (in my case in the screenshot below the tab Index (and Label) are both: Contacts
Anyway - just thought someone else may find that helpful 
Nick
2 Likes
thanks @nickaus I found this helpful and exactly what I needed. Thanks!!
1 Like
Thank you for this. It help with an issue I had with tabbed container and using buttons to select views.