In OBIEE, you can easily set a dashboard section to be “Collapsible” which allows a user to collapse or minimize that section when desired. By default, when a dashboard page is opened, the sections are maximized or expanded (i.e., not collapsed).
But what if you have a requirement to have a section minimized or collapsed by default? There is no flag or option to do that. This post shows you how to make a section minimized / collapsed by default.
I found the solution for making a dashboard section collapse by default here… http://www.orakelite.com/2013/01/iii-javascriptcss-tips-to-obiee-ui.html
However, the author did not include some details which I will cover here.
First, you need to make the section collapsible, by simply editing the dashboard…
… and then setting the “Collapsible” property of the relevant section.
You will need to add the following Java Script to the section you want to minimize by default.
The text highlighted in the Java Script is the Section ID of the section to be minimized by default. So first you will need to find this Section ID.
——–
var sectionId = “d:dashboard~p:ve9fga7bp3omltnr~s:9qfn1ms6bco9bsva“;
var sectionDiv = document.getElementById(“Embed”+sectionId);
var plusImg = document.getElementById(sectionId+”Max”);
var minusImg = document.getElementById(sectionId+”Min”);
var contentsTable = document.getElementById(sectionId+”Contents”);
minusImg.style.display = “none”;
contentsTable.style.display = “none”;
plusImg.style.display = “”;
sectionDiv.setAttribute(“minimized”, “true”);
——–
To determine the value of the Section ID, you need to go to the dashboard page and from the browser menu, select View –> Source.
Search for the section by name, or just search for the word “section”. This should help you to identify what Section ID is related to the section you are interested in. (In example below, the black arrow points to the SECTION ID, and the red arrow points to the user given section name that can be used to search. )
Use your Section ID in the Java Script code above.
Place the Java Script code in a “Text” dashboard object inside the section you want to control.
Save your dashboard page changes.
Now when you reopen the dashboard page, the section will be minimized / collapsed by default.