Custom Controller in an unrelated tab panel

I have my main form showing individual patients in record form with a custom controller showing patient names using a form based on the same patient table (in list view locked). This makes it handy for my data managers to quickly scroll through a foundset of records picking out ones that need attention (particularly nice with the RowBGcolorCalc). They can also search a different database looking for an individual patient’s Surgical Pathology records. This is done in a module and up until now I’ve been using a FormInDialog to display those results. The SurgPath form in the module also has a similar structure with a custom controller form showing the cases that match the criteria and the main form being in record view showing the selected case in detail. On both the main patient form and the main SurgPath (module) form there is also a tab panel showing related data.

This all works OK but I’d like to do something different. Instead of a FormInDialog, I want to show the SurgPath records as an unrelated tab within the main patient tab panel. It’s unrelated so that the datamanagers can search for records that aren’t currently related (medical record numbers can be missing or wrong) and ‘relate’ them as I do with the FormInDialog. However I can’t get the custom controller form to show up at all in the tab, just the main record. A default controller works but doesn’t show the extra information I can have in a custom controller. In both cases (unrelated tab panel/FormInDialog), I am loading the records I want via SQL. If I make a new form based on the same case table using a separate tab panel showing a list view form of the table to act as the ‘controller’ then that is visible but ONLY the first record of the loaded records is showing.

So my question is does a custom controller not work within an unrelated tabpanel when the main form already has a custom controller? Looking back on a solution I developed and deployed with Servoy 2.2 I see that I used portals to be able to flip through RELATED records within a tabpanel. But those records were all directly related in a hierarchical fashion and I can’t remember whether I did that because I liked that display better or because custom controllers don’t work within tab panels. Checking the Servoy CRM I don’t see that used anywhere although there is also no particular reason it needs it. Ideally here though I would like it. If it’s not possible I can use a FID. Any thoughts?

That’s right - the custom controller only works once.

Here’s the answer - use a tabless tabpanel and put your controls in that. You have MUCH more control and if you use multiple forms in that tabpanel - you can even “switch” them live during the session (see the “servoy_sample_crm” for an example on how to do this).

Hi Bob,

Thanks for the info. Didn’t know that about custom controllers but that’s what it appeared. I had looked at the crm to see how that was set up and saw that everything was tabless tabpanels on the left as the master controller. One follow up question though.

It appeared there that everything really ran from one tabless tabpanel in the CRM. I’d like to have two simpler navigation areas: one constant one up all the time showing my patient foundset, the other only when the surgpath tab is active and only showing within that tab. I briefly tried that and the navigation tabpanel would show up on the surgpath tab but only the first record. (I might not have got all the right options set so I’ll check that). But is it POSSIBLE to have one custom controller on the left and then another sub-controller tabless tabpanel only operating within a regular tabpanel when that tabpanel is selected? I’d like the main controller to always be active and only ever showing the current foundset of patients with a separate way of navigating through a selected patient’s group of surgpath reports.