Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Using new Where Tab methods

$
0
0
A recent maintenance release added two new methods to the Additional WHERE tabs API: setTabShowCount and setTabHideEmpty. But the documentation has not yet been updated. I had to do some experimenting, but I figured out the syntax, in case anyone else is wondering:

WhereTabs.setTabShowCount(table, id, true/false);
WhereTabs.setTabHideEmpty(table, id, true/false);


For example:
WhereTabs.setTabShowCount("AdminDonations","submitted",true);


Also, I noticed that WhereTabs.deleteTab doesn't seem to work on tabs created in the GUI. I was trying to add a tab at runtime and remove one created at design time (based on a user role), but was unable to remove the tab created at design time. Also, I wanted my new tab to appear first among the other tabs, but there is no option to determine the order when mixing tabs like this.

So I wound up deleting all where tabs added through the GUI and just added them all in the order I wanted in the event code. This works fine. I guess I don't understand the use case for WhereTabs.deleteTab if it only works on tabs also created using the API code, especially since the API works only in one event.

Viewing all articles
Browse latest Browse all 2586