Problem with a related tab panel

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

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):

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()

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

ill try that thank you