Set currentview tabbed container in module

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.