# Problem with a related tab panel

**URL:** <https://forum.servoy.com/t/problem-with-a-related-tab-panel/10300>\
**Category:** Classic Servoy\
**Created:** [February 19, 2009, 12:52pm UTC](https://forum.servoy.com/t/problem-with-a-related-tab-panel/10300 "2009-02-19T12:52:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andres\_achiary](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@andres\_achiary](https://forum.servoy.com/u/andres_achiary)\
**Post date:** [February 19, 2009, 12:52pm UTC](https://forum.servoy.com/t/problem-with-a-related-tab-panel/10300/1 "2009-02-19T12:52:44Z")

</div>

Hi all

As the subject already says, Im having troubles with a related tab panel.

I have a form named PERSONAS with a related tab panel containing the form named INTERVENIENTES\_JURIDICOS\_TAB. In this last form I have a button that goes to a more detailed form called INTERVENIENTES\_JURIDICOS. The problem that I have is that no matter in what record I am in the form contained in the tab panel, it goes to id number 1 in the detailed form when it should show me the record where I actioned the button. It seems that the two forms of the same table are working with different foundsets when they are not told to do this.

Im working with version 4.1 and this worked in older versions.

The method of the button is a simple show() of INTERVENIENTES\_JURIDICOS.

The relation between PERSONAS and INTERVENIENTES\_JURIDICOS is by fields that are not the primary key, is this a problem???

The view of INTERVENIENTES\_JURIDICOS\_TAB is a table\_view, so the button appears in each record the form contains.

Any ideas???

Thank you and hope you understood

Andres Achiary

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [February 19, 2009, 1:48pm UTC](https://forum.servoy.com/t/problem-with-a-related-tab-panel/10300/2 "2009-02-19T13:48:44Z")

</div>

You say the INTERVENIENTES\_JURIDICOS\_TAB is a related tab, so Servoy has to enforce a related foundset. That is not the same as the “normal” foundset of INTERVENIENTES\_JURIDICOS.

Try to do this (if the button is placed in INTERVENIENTES\_JURIDICOS\_TAB):

```auto
forms.INTERVENIENTES_JURIDICOS.loadRecords(foundset) // load the foundset from INTERVENIENTES_JURIDICOS_TAB
forms.INTERVENIENTES_JURIDICOS.setSelectedIndex(foundset.getSelectedIndex()) // select the same record
forms.INTERVENIENTES_JURIDICOS.controller.show()

```

---

<div class="post-metadata">

**Author:** ![andres\_achiary](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@andres\_achiary](https://forum.servoy.com/u/andres_achiary)\
**Post date:** [February 19, 2009, 2:11pm UTC](https://forum.servoy.com/t/problem-with-a-related-tab-panel/10300/3 "2009-02-19T14:11:41Z")

</div>

thank you very much Patrick that was what i thought but i needed a confirmation…

ill try that thank you
