43
Views
5
Comments
Solved
[OutSystems UI Web] How to maintain on the Active Tab after I click on an action?
Forge component by OutSystems R&D
62
Published on 22 Feb 2021
Application Type
Traditional Web
Service Studio Version
11.10.7 (Build 37468)

Hi All,

I have 2 Tabs.  I switched to Company Access Tab (Current Active Tab) to delete selected company. After I delete success, it does not remain at the same active tab. Instead, it goes back to User Details Tab. 

 

How can I achieve the mentioned situation?

mvp_badge
MVP
Rank: #72
Solution

Hi Gwen,

For the mentioned case, I would suggest setting the Delete link On Click method type to Ajax Submit instead of Submit.

Hope this helps you!


Kind regards,

Benjith Sam

Rank: #4301

Hi Benjith,

Thanks for pointing this out! It works as expected! 

Champion
Rank: #271
Solution

Hi Gwen,

  1. You should create a Local Variable named as CurrentActiveTab in your screen.
  2. Create an Input parameter named as CurrentTab in your Delete action.
  3. While calling Delete action, pass the Name of your currently active tab in your CurrentTab parameter with link's destination property.
  4. Assign CurrentActiveTab=CurrentTab at the last of Delete action.
  5. Use same local variable 'CurrentActiveTab' in Tabs ActiveTab property

Hope this helps , Thanks :)

Rank: #4301

Hi Shweta,

Thanks for your detailed explanation and guidelines! 

Both of your solutions did help  :) 

Champion
Rank: #271

Hi Gwen,

I have attached a sample OML herewith for your problem as a reference.

You can also check below link of the demo:

https://shweta-gedam.outsystemscloud.com/TabsDemo/TabsDemoPage.aspx


Hope it helps, Happy Coding!!

TabsDemo.oml

mvp_badge
MVP
Rank: #72
Solution

Hi Gwen,

For the mentioned case, I would suggest setting the Delete link On Click method type to Ajax Submit instead of Submit.

Hope this helps you!


Kind regards,

Benjith Sam

Rank: #4301

Hi Benjith,

Thanks for pointing this out! It works as expected!