breaking related foundset

Hi,

I have a master form with a detail form in a related tab panel.

I want to search within the related form independent of related records.
ie I want to search within the full foundset.
But this did not work and it finds records within the related foundset.

So I used controller.loadAllRecords() in the related form before the find.
It worked for 1st time & not the 2nd then it worked for the 3rd and not the 4th and so on..
So I used controller.loadAllRecords() twice as

controller.loadAllRecords();
controller.loadAllRecords();

and it worked.

Is this a bug?

Please help!

//*** set the confirmed_quote_id to the current quote_id for manual history records
frmObjQuoteProductManual.controller.loadAllRecords(); //*** to break the related fs within tabpanel
frmObjQuoteProductManual.controller.loadAllRecords(); //*** only breaks if used twice. so this line.
frmObjQuoteProductManual.controller.find();
frmObjQuoteProductManual.quote_id = frmObj.quote_id;
frmObjQuoteProductManual.controller.search();
var fsUpdater = databaseManager.getFoundSetUpdater(frmObjQuoteProductManual.foundset);
fsUpdater.setColumn("confirmed_quote_id", frmObj.quote_id);
fsUpdater.performUpdate();

Is the master to detail form a normal parent child relation?(not a selfjoin?)
The foundset of the related tab panel is always limited by the relation,
so it seems a bit weird to do a “forced” find over the complete child table.

if you want that behaviour, I would make the tabpanel relationless and let the foundset be determined by a script (eg. fired onRecordSelect of parent record) This will leave you with freedom to do anything with the “child” foundset.

The master to detail form is a normal parent child relation only and not a self join.

Are you saying that if we use a form in a related tabpanel then I could not use it for normal full table search.

Also are you saying that if I use childForm.loadAllRecords() it will not load all the records in the full table? and If I use childForm.loadAllRecords() twice it will load all records in the table?

I think it is logical that if I want to a do a search on the childForm it should search the whole table. For example if I want to search childForm for records from two parent records, do I need to create another childForm2 using the same table? I think it is not necessary.

I think it is logical that if I want to a do a search on the childForm it should search the whole table.

Not if you are showing the child form through a tabpanel that’s located on the parent form. I would only expect RELATED records there.

If you are re using the Child form in an independent setting (read: as a main form) then the foundset can be anything you want because there’s no “parent record” context.