This topic is locked
[SOLVED]

 Disable 'Additional WHERE Tabs' on Details Records

4/21/2020 8:24:21 AM
PHPRunner General questions
need2sleep authorDevClub member

I have 3 tables (orders, comments, call_log) with 5 'Additional WHERE Tabs' on each one (today, last 7 days, 30 days etc...)
I have 8 'Detail' tables connected to a main 'client' table including the 3 table above.
When I expand the 'Details' on the 'client' table, I'm flooded with about 20 tabs because it includes all the custom WHERE tabs created on the list page.
Is it possible to only have one main tab during a master/detail view? Is there a way to hide tabs based on the condition if it's opened in a master table setup?
I understand I can create another view but before I do that, was looking to see if there was a simplified approach.
Thank you,

mbintex 4/21/2020

You can hide the where-tabs depending of the existence of a masterrecord like so

$master = $pageObject->getMasterRecord();
if ( $master != Null or $master !="" )

{

$pageObject->deleteTab("aktuell");

$pageObject->deleteTab("archiv");

$pageObject->deleteTab("meine");

$pageObject->deleteTab("monat");

$pageObject->deleteTab("quartal");

$pageObject->deleteTab("halbjahr");

$pageObject->deleteTab("jahr");

$pageObject->deleteTab("hausmeister");

}
need2sleep authorDevClub member 4/21/2020



You can hide the where-tabs depending of the existence of a masterrecord like so

$master = $pageObject->getMasterRecord();
if ( $master != Null or $master !="" )

{

$pageObject->deleteTab("aktuell");

$pageObject->deleteTab("archiv");

$pageObject->deleteTab("meine");

$pageObject->deleteTab("monat");

$pageObject->deleteTab("quartal");

$pageObject->deleteTab("halbjahr");

$pageObject->deleteTab("jahr");

$pageObject->deleteTab("hausmeister");

}



Thank you for the reply. This helped steer me in the right direction.
After looking up the manual, it mentions that this version is being deprecated. Additional WHERE tabs API: deleteTab

WhereTabs::deleteTab("invoices", "overdue");


I like the new code because you can specify which table if you have similar IDs across other ones.
So I put the code in 'After Table Initialized' on the master table without having to use any IF statement and it worked perfectly. Hope this information helps you too. Thanks!