Trigger Child Module Tabs 'setCurrentViewIndex' off of Parent Query Success

  • Goal: Trigger a javascript snippet to run and set a tabbed component's view index upon success of its parent module's query.

  • Steps:

  1. Create an app with a child module inside it with a tabbed component.
  2. Create a parent query. Upon selecting a user (the trigger conditions), the child module is displayed.
  3. The child module's tab state is left on the same tabs that were displayed before.
  • Details:
    I would like to discover a way to "reset" the tabs to the original state that is loaded upon initialization once the parent's query is triggered.

Hi @pomelo - welcome to the forums!

In the parent module query, you would set up an Event Handler for Success:

You can either trigger an existing query if that's where your JS snippet lives, or you can put the JS snippet in the success handler directly:

Depending on how you setup the container (tabbedContainer1 in my example) and what specifically you want it to do, you will want something like tabbedContainer1.setCurrentViewIndex(x) where x is a zero based index or tabbedContainer1.setCurrentView([key]) where [key] is the string for the tab's key.