Hi Anitha,
You can open the content perspective (positioned to a specific folder) within the switcher of the current Cognos session, with the following:
__glassAppController.openAppView("content",{content:{tab: 'teamContent' ,folder: 'i5283286BC55B4A4FA90A44814E1A4FDF'}})
(where the folder parameter is set to the storeId of the specific folder you want to open.)
Similarly, you can use the openAppView method to open other perspective types in the switch as well., e.g.
Cheers,
Jim
------------------------------
Jim Boland
------------------------------
Original Message:
Sent: Fri July 08, 2022 03:00 AM
From: Anitha Royal
Subject: Dynamic Folder Opening from the customized Home Page
Hello Zdenek ,
Thank you so much for your reply , the js code provided is working fine but it renders the folder's content in left pane Slidingout ,whereas in cognos 11.2v folder content is rendering with perspective=content appended with folderID in the browser url. The rendered folder content is displayed within the switcher menu.
Iam attaching the screenshots for reference and if any code snippet available supporting opening folder content dynamically from customized landing web page
within the switcher please share the details.
Folder content in SlidingPane with the provided js code . This is for 11.1.7 v Cognos
Folder Content rending in 11.2v Cognos analytics
------------------------------
Anitha Royal
Original Message:
Sent: Wed July 06, 2022 04:14 AM
From: Zdenek Hanzal
Subject: Dynamic Folder Opening from the customized Home Page
Hi,
you can try this javascript with corresponding html items
Example JS
function openFolder(path){
window.parent.__glassAppController.showSlideOut(
{id: '123',
position: 'left',
resizable: true,
width: '400px',
content: {
id: '123',
skipAncestors: false,
trackBreadcrumbs: true,
showBreadcrumbs: true,
module: 'bi/content_apps/GenericFolderWideView',
folder: path
}
});
if(debugMode != 0){
console.log("Debug mode function openFolder");
console.log("******************************************");
console.log("Open folder path: " + path);
console.log("******************************************");
}
}
------------------------------
Zdenek Hanzal
Original Message:
Sent: Tue July 05, 2022 07:56 AM
From: Anitha Royal
Subject: Dynamic Folder Opening from the customized Home Page
Hello all,
We have our customized Home Page where it lists all the User's preferred Reports, Dashboards and Folder paths . So, here can we open a folder path(shortcut link) in a single click within a switcher in 11.2 content Tabs from home landing page ? Using Folder opening extension code , folder path is mentioned statically in spec.json file and only one folder can be done . But in our landing page we have multiple links for multiple folders which are user specific and listed in Customized landing page .
If anybody has implemented opening a folder content from customized landing web page please share the details.
------------------------------
Anitha Royal
------------------------------
#CognosAnalyticswithWatson