Steps to follow :
1.Don't hide "Apply" button from the dashboard.
If you hide "Apply" button, values pass automatically from prompts to reports.
2.Hide "Reset" button from the dashboard.
Hide & Stop passing the values until click on the "Apply" button. For that follow the code
<style type="text/css">.PromptViewCell .button{display:none}</style>
For Single "Apply" button and the functionality as follows,
<DIV CLASS = "XUIPromptEntry minibuttonOn">
<input class="button" type = "button" value = "Apply" onclick='javascript:
try
{
var aElm=PromptManager.getPromptManager().getAllPromptCollectionJSON();
for(var i = 0; i < aElm.length; i ++ )
{
{
for(var j = 0; j < aElm[i].promptSteps[0].prompts.length; j ++ )
{
var promptid = aElm[i].promptSteps[0].prompts[j].promptStreamID ;
var g = null;
var h = PromptManager.getPromptManager().getPromptCollectionInfoWithViewID(aElm[i].viewStatePath);
if(h)
{
try
{
var b = h.getAllPromptExprsArray();
if( ! h.verifyPromptValuesAndDisplayError(b))
{
return
}
g = PromptManager.buildPromptExprGivenExpr(" ", b)
}
catch(f)
{
alert(f);
return
}
}
PromptManager.submitPrompt(aElm[i].viewStatePath, true, "PromptFinish", g)
}
}
}
}
catch(e) {alert("Apply ALL Button Exception " + e.description);}'></input>
<input class="button" type = "button" value = "Reset" ONCLICK = 'return PersonalizationEditor.removeDefaultSelection(false)' > </input>
</DIV>
"Apply" button settings
"Reset" Button Settings
I am having 2 different set of prompts
1st Prompt contains period information (Year & Month)
Save as Test1
2nd Prompt contains Office & Product information
Save as Test2
Report is as follows
Save as Test1
Hide & Stop Apply button functionality
Place the Blue in color code in the Text box (in this example: Text1)
"Apply" & "Reset" button code and functionality
Place the Red in color code in the another Text box (in this example : Text2)
Dashboard layout
Dashboard at Finally
Clicks on "Apply" button
Clicks on "Reset" button
Note : While copy & paste the codes beware of double quotes (" ). If double quotes are not proper in copying adjust and then paste.
1.Don't hide "Apply" button from the dashboard.
If you hide "Apply" button, values pass automatically from prompts to reports.
2.Hide "Reset" button from the dashboard.
Hide & Stop passing the values until click on the "Apply" button. For that follow the code
<style type="text/css">.PromptViewCell .button{display:none}</style>
For Single "Apply" button and the functionality as follows,
<DIV CLASS = "XUIPromptEntry minibuttonOn">
<input class="button" type = "button" value = "Apply" onclick='javascript:
try
{
var aElm=PromptManager.getPromptManager().getAllPromptCollectionJSON();
for(var i = 0; i < aElm.length; i ++ )
{
{
for(var j = 0; j < aElm[i].promptSteps[0].prompts.length; j ++ )
{
var promptid = aElm[i].promptSteps[0].prompts[j].promptStreamID ;
var g = null;
var h = PromptManager.getPromptManager().getPromptCollectionInfoWithViewID(aElm[i].viewStatePath);
if(h)
{
try
{
var b = h.getAllPromptExprsArray();
if( ! h.verifyPromptValuesAndDisplayError(b))
{
return
}
g = PromptManager.buildPromptExprGivenExpr(" ", b)
}
catch(f)
{
alert(f);
return
}
}
PromptManager.submitPrompt(aElm[i].viewStatePath, true, "PromptFinish", g)
}
}
}
}
catch(e) {alert("Apply ALL Button Exception " + e.description);}'></input>
<input class="button" type = "button" value = "Reset" ONCLICK = 'return PersonalizationEditor.removeDefaultSelection(false)' > </input>
</DIV>
"Apply" button settings
"Reset" Button Settings
1st Prompt contains period information (Year & Month)
Save as Test1
2nd Prompt contains Office & Product information
Save as Test2
Report is as follows
Save as Test1
Hide & Stop Apply button functionality
Place the Blue in color code in the Text box (in this example: Text1)
Place the Red in color code in the another Text box (in this example : Text2)
Dashboard at Finally
Clicks on "Apply" button
Clicks on "Reset" button
Hi There,
ReplyDeleteThanks a lot for the code, however when I am trying the above code it's not working. Its gives me error
TypeError: Cannot set property 'bCalledFromMobileAPI' of undefined
Any help would be much appriciated.
Thanks in advance.
Did you get both the buttons (Apply & Reset)?
ReplyDeleteWhich code throwing error?
Even I am getting the same error...TypeError: Cannot set property 'bCalledFromMobileAPI' of undefined..Could you please inform why this is happening?
ReplyDeleteIt happens for me as well (obiee 12.2.1.2.0)
ReplyDeleteReplace "if( ! h.verifyPromptValuesAndDisplayError(b))" with "if( ! h.verifyPromptValuesAndDisplayError(b,{bCheckForRequired:true}))"
DeleteBut, now the CSS that hides the apply buttons stopped working for me (in Oracle Analytics Cloud). Anyone have a clue on that?
This code is workng fine in OBIEE 12C,but Export to Excel from dashboard is not working
ReplyDeleteA mí me pasa igual. Lo solucionaste?
ReplyDelete