Within TM1 Web we can utilise the TM1 Web API which is a URL API. This allows us to make hyperlinks(anchors) which open web reports or cube views that we choose (instead of relying on Action Buttons or the Navigation Panel). The problem with this presently is that all hyperlinks (in TM1web) open in a new window which may break the whole "Seemless Integration" Bubble we would like clients to experience.
I've written a little mod/hack for TM1Web that applies smart logic to the Hyperlink process. Using this mod TM1Web will look at the URL and if it includes TM1Web in there somewhere it will open in the active window instead of in a popup.
Decent uses of this mod:
- Making Drillable Accounts/Costcentres in an Active Form.
The use of the Hyperlink excel function. (allows for conditional logic determining which webreport to load next) - workaround with action buttons is available
Normal Navigation between workbooks (and passing parameters) - can do with action buttons
Within the /TM1Web/Scripts Internet Directory open "tm1webbook.js" (This is usually in C:\inetpub\wwwroot\ )
Replace the code:
Code: Select all
case 'Link':
unSelectEverything();
SetSheetCurrentCell(srcElem.parentNode);
if ( srcElem.getAttribute('LinkType') == 'LINK_EXTERNAL' ) {
cancelEventBubble(e);
window.open(srcElem.getAttribute('refValue'), '_new');
}
else {
var cellID = delem[1] + "_" + delem[2] + '_' + delem[3];
SubmitForm(delem[0], cellID);
}
break;
Code: Select all
case 'Link':
unSelectEverything();
SetSheetCurrentCell(srcElem.parentNode);
if ( srcElem.getAttribute('LinkType') == 'LINK_EXTERNAL' ) {
cancelEventBubble(e);
//Get the hyperlink location for searching
var slocation = srcElem.getAttribute('refValue');
//Look for "TM1Web" in it
if( slocation.indexOf("tm1webmain") > 0)
{
//Set the location of the current window instead of opening a new.
window.location = srcElem.getAttribute('refValue');
} else {
//Open a new window as per usual
window.open(srcElem.getAttribute('refValue'), '_new');
}
}
else {
var cellID = delem[1] + "_" + delem[2] + '_' + delem[3];
SubmitForm(delem[0], cellID);
}
break;