How to hold the Active Tab While going to next screen in Outsystems Mobile app

How to hold the Active Tab While going to next screen in Outsystems Mobile app

  

Hi,

I have a screen with 3 tabs & each tab List Item has a redirection to particular further screen.

While I come back from any of the further screen to actual Tab screen, I want to set the Tab Active which was there last before going to next screen.

Kindly

Assif



Solution

Hi Assif,

You should add a handler to the tabs event OnTabChange, and store the ActiveTab on a local variable, then pass it as input parameter to the next screen and back.

Then just use it as input parameter of the tabs block.

Alternatively you can save it on the local DB or on a window variable, and onInitialize of the screen or query after fetch set the Active tab as the one you just fetched.

Hope it helps 

Solution

Henrique Batista wrote:

Hi Assif,

You should add a handler to the tabs event OnTabChange, and store the ActiveTab on a local variable, then pass it as input parameter to the next screen and back.

Then just use it as input parameter of the tabs block.

Alternatively you can save it on the local DB or on a window variable, and onInitialize of the screen set the Active tab as the one you just fetched.

Hope it helps

Hi Henrique,


Maybe a session variable would better server the purpose over here, what do you say.


-Cheers

Atul Patel


Hey Atul,

That would be great, but there's no session variables on mobile :(

Cheers

Henrique Batista wrote:

Hey Atul,

That would be great, but there's no session variables on mobile :(

Cheers

ohhh yes Henrique, I missed reading out Mobile. my bad :)

 

local DB will be one to try out.

Henrique Batista wrote:

Hi Assif,

You should add a handler to the tabs event OnTabChange, and store the ActiveTab on a local variable, then pass it as input parameter to the next screen and back.

Then just use it as input parameter of the tabs block.

Alternatively you can save it on the local DB or on a window variable, and onInitialize of the screen or query after fetch set the Active tab as the one you just fetched.

Hope it helps 

Implemented the same & working perfect :)