Load Data from tabs on tab change

Hi All,

I wanted to get content of the tab on activation of that particular tab using Navigation/tabs  Do you have an idea, how to do this with the new OS UI as I already know with web patterns we can achieve this through loadonclick function which was available but now it's deprecated.

Thanks in Advance 

Hi,

you can use OnTabChange Handler and run your desired logic

Aliaksandr Kasko wrote:

Hi,

you can use OnTabChange Handler and run your desired logic

Do you have any example for that?

I'm not sure exactly how we can achieve it 

Hi Gandeev,

Here's one possible way to approach this:

  1. Create an Integer variable in your screen (something like "ActiveTabIndex").
  2. In the Tabs pattern's "OnTabChange" event, create an action that assigns the event's input parameter to your variable:

  3. Isolate the content of your screen in blocks, and place them inside IFs that check the value of your "ActiveTabIndex" variable:

Now your blocks and their content (including aggregates and data actions) will only be loaded when the tab that contains them is activated.

Aurelio Junior wrote:

Hi Gandeev,

Here's one possible way to approach this:

  1. Create an Integer variable in your screen (something like "ActiveTabIndex").
  2. In the Tabs pattern's "OnTabChange" event, create an action that assigns the event's input parameter to your variable:

  3. Isolate the content of your screen in blocks, and place them inside IFs that check the value of your "ActiveTabIndex" variable:

Now your blocks and their content (including aggregates and data actions) will only be loaded when the tab that contains them is activated.

Hello,

After using if condition its not fetching the data for the respective tab.

It's showing empty :( 

Can you share more details about your implementation? Is it possible for you to share your OML?