Going to a related record without limiting foundset

Hi,

is there a way to go to a related record without changing the foundset of the destination form?
I’m trying to implement the same functionality given by FileMaker using Go To Related Record (without the option Show Only Related Records) but I only found a very slow solution, based on a loop.

The problem is that, if I launch a LoadAll, the foundset jump to the first record, instead of remaining on the active record.

Any idea?

If the forms are based on the same table (and not using separateFound set property) you just can call:

forms.otherformsametable.controller.show()

This will make the form show and becouse they have the same foundset they have the same records selected

If the forms are not on the same table it is not possible.

Jan Blok:
If the forms are based on the same table (and not using separateFound set property) you just can call:

forms.otherformsametable.controller.show()

This will make the form show and becouse they have the same foundset they have the same records selected

Three forms, two tables:
Form quotations, table quotations
Form payments, table quotations
Form invoices, table invoices

Invoices and quotations are related via quoteid.
Suppose I’m on quotation nr 10. Then, I move to Invoices form, opening
invoice nr 50 (related to quotation nr. 2. After that, I go to payments using

forms. payments.controller.showRecords(forms.Invoices.invoices_to_quotations)

I get one single record showing me payments of quotation nr. 2: If I use forms.quotations.controller.show, I should see quotation nr 2, right?
Wrong: I end up on quotation nr 10.

Of course, forms Quotations and form Payments don’t use separate foundset.

I’m sure I’m missing something, but…what? :wink:

No if a relation is needed it is impossible… but why is it important?

Jan Blok:
No if a relation is needed it is impossible… but why is it important?

Because, if I user is watching the payments related to a certain quotation (even if he’s cominq from the invoices), he expects to see that particular quotation, when switching to this form.
But if I use a relation to show it, I limit the foundset to this quotation only, forcing the user to click Show All to move back and forward in the quotation form. But, clicking Show All will bring the focus out of the record I’m watching.
In this case, it would be useful a function like GoToRecord(pk) :wink:

Second the request for that feature. For the same reason as Riccardino, I make extensive use GoToRelated() without ‘show only related records’ in the solution I’m porting from FileMaker to Servoy.

Riccardino:
In this case, it would be useful a function like GoToRecord(pk) :wink:

Will be avaible in Servoy 2.1, as foundset.selectRecord(pkid1,pkid2…pkidn)

Jan Blok:

Riccardino:
In this case, it would be useful a function like GoToRecord(pk) :wink:

Will be avaible in Servoy 2.1, as foundset.selectRecord(pkid1,pkid2…pkidn)

Yeah! :D