Sorry: another foundset question

Hello,

my favourite topic strikes back: foundsets.

I have this setup:

  • a form based on Table A showing a tab panel
  • one of the tabs shows a detail view of the Table A data and is hooked into the tab panel as relationless

Now the problem. When I show the form I manually load a foundset into it. I also load that foundset into the form of the unrelated tab. Now I have a problem when browsing through records. The data in the “main form” (the one with the tab panel) is correctly walked through, but the data in the unrelated form in the tab stays on the first record. How can this be prevented/overcome?

Thanks
Patrick

Follow up: the only solution I see is to self-relate that table (pk on pk). While that seems to work OK, I find that approach a little nasty.

This is exactly the way to do and it is not nasty! :)
Why is it?

Have you ever seen the query that this generates? I will check this out…

if you are realy setting both forms to the same foundset and both are not using seperate foundset feature. Then setting the selection on one should also move the selection of the other.

In my setup that was not the case:

…I manually load a foundset into it. I also load that foundset into the form of the unrelated tab…

just made a simple test, with 2 forms build on the same table with the same foundset. One shown unrelated in the other. And where i changed the selection (a or b) the other also changed. So somehow you really don’t have the same foundset in the unrelated as you have in the main form.
If you could give an example then i can look whats going wrong.

Have you manually loaded a foundset in both of them?

yes a related:

forms.companies.controller.loadRecords(companies_to_companies);
forms.companies2.controller.loadRecords(companies_to_companies);
forms.companies.controller.show();

I see if I can put together an example.