# Open a program / form in a tab and get a return value

**URL:** <https://forum.servoy.com/t/open-a-program-form-in-a-tab-and-get-a-return-value/17315>\
**Category:** Classic Servoy\
**Created:** [July 1, 2013, 8:13am UTC](https://forum.servoy.com/t/open-a-program-form-in-a-tab-and-get-a-return-value/17315 "2013-07-01T08:13:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![briese-it](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@briese-it](https://forum.servoy.com/u/briese-it)\
**Post date:** [July 1, 2013, 8:13am UTC](https://forum.servoy.com/t/open-a-program-form-in-a-tab-and-get-a-return-value/17315/1 "2013-07-01T08:13:47Z")

</div>

How is it possible to open a program / form in a tab and get a return value back (maybe if the program / form tab is closed), if a new record is created or the selected record is shown in the open program? It is possible to open a program in a tab with the function: _“globals.svy\_nav\_showProgram();”_, but how is it possible to get a return value back to the form from which is call the function? Similar to the functionality of the _showLookupWindow_.

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [July 1, 2013, 9:36am UTC](https://forum.servoy.com/t/open-a-program-form-in-a-tab-and-get-a-return-value/17315/2 "2013-07-01T09:36:24Z")

</div>

That is currently not possible.

What would you expect if the user doesn’t close the layout but uses the tabs on top to switch to another one? Or what if something else is opened in the menu?

---

<div class="post-metadata">

**Author:** ![briese-it](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@briese-it](https://forum.servoy.com/u/briese-it)\
**Post date:** [July 1, 2013, 10:49am UTC](https://forum.servoy.com/t/open-a-program-form-in-a-tab-and-get-a-return-value/17315/3 "2013-07-01T10:49:05Z")

</div>

> Joas:  
> That is currently not possible.
> 
> What would you expect if the user doesn’t close the layout but uses the tabs on top to switch to another one? Or what if something else is opened in the menu?

For example, a message that the user has to complete the task and the only way to achieve this, is to close the tab. Other tabs / menus in this case are not selectable. If this would be possible, the _dc\_save_ method of a form is called, so the problem: [SVYFRMWK-542: “scopes.svyLookupWindows.showLookupWindow() should call the forms dc\_save() method”](https://support.servoy.com/browse/SVYFRMWK-542) doesn’t occur.

I found a way to switch to a tab program: _globals.svy\_nav\_switchTabProgram(event,\_program)_. In this case it is possible to switch to a tab, but only if the program (A) is added to the layout of a another program (B). Further in this case, if B is open, also A is open in tab, but in the program / layout B. So, there are 2 versions of tabs? For what is the tab of a layout intended?
