I have a demo file of this problem (9kb). Attachments are currently turned off on ServoyTalk from my location. Send eMail to morley@7office.com and I’ll send it.
I have two forms based on a single table, a UserInterface (UI) form and a TabPanel(TP) form. There is just an identifying Name field and a delete button on the tabpanel. The UI form is set to show only those records belonging to the top rank. In the attached demo, that’s just four records. When the user clicks on the delete button, its script is intended to find not only the top rank record but also all related lower level records. Top rank records have a value of “L1”, “L2”, etc in the “TestKey” field. Lower level records have additional text following.
Here’s the code.
var key = testkeya + '%';
forms.tabpanel.controller.find();
forms.tabpanel.testkeya = key;
forms.tabpanel.controller.search();
var max = controller.getMaxRecordIndex();
plugins.dialogs.showInfoDialog( 'info', 'Delete ' + max)
Here’s what happens. No matter which top level record the user clicks on, just that top level record is found. However if I go to the tabpanel form itself and click on the same top level record I get a correct response.
Not sure what I’m missing.