jenC - Thursday, March 18, 2010 2:33 PM:
Hi,
we would like to implement a standard behavior on all of our relationship grids such that the tab name would update to include the number of relationships on that tab.
For instance, if I had 4 tabs (Comments, Change Log, Tasks, Linked Workflows), when someone opened the item type, the tabs would change names to display the number of related items on each tab (so they know if they should bother looking at them))
Something like:
Comments (4), Change Log(2), Tasks, Linked Workflows (12)
I'm pretty sure I can figure out where to do this my modifying an html/script file (like relationshipsGrid.html perhaps).
If I do, will I affect anything in a negative way? Will getTabID("Comments") still work? Or would I need to modify that method as well to strip out parentheses when comparing?
Basically wondering if anyone sees a reason I shouldn't implement this functionality.
jenC - Friday, March 19, 2010 1:33 PM:
I've run into a few gotchas:
1. Federated relationships - no way to populate count on this without running the federated OnGet event which can be time consuming.
2. If a user adds a new relationship, saves the item, the tab name doesn't refresh to display the new count.
Any ideas to get around this? BTW, the code I found to modify is in relationships.html in initRelTabbar() . Turns out the tab already contains an attribute called "relationships_in_db" so I just appended that to the tab label and passed it in to the add tab method.
Louise - Wednesday, April 13, 2016 6:56 AM:
Hi Jen,
this sounds like a great idea! Did you implement this, or did it turn out not to be such a great idea after all?
Best regards,
Louise