Match all records in current found set

Help please, what’s an efficient way to emulate the Filemaker
“Go to related records” with its ‘match all records in current found set’ option. Specifically, I have a found set of Invoices on show in one form, and I want to move to an other form to show the foundset of all related Items using the Invoices_to_Items relation (not just the children of the current Invoice record)

Appreciation in advance.

Have a look at

//Convert a foundset based on a one to many relation
//Convert in the order form a orders foundset into a orderdetails foundset
var convertedFoundSet = databaseManager.convertFoundSet(foundset,order_to_orderdetails);
forms.orderdetails.controller.showRecords(convertedFoundSet);

Hope this helps.

That’s the one! Thanks, Patrick.