Home » BI Answers

Clear button for Default Prompts

18 June 2010 7,942 views 9 Comments
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

Many a times we come across a requirement to provide the users with a button on the Dashboard which will clear the values selected in Prompt. We can do this by a bit a scripting, lets see how we can achive this.

To achive this first we need to create a button and then call a function on that button click which clears the values selected in the prompt.

  • Edit the dashboard page on which we have to place this button.
  • Then pull the Text box from the Dashboards Objects to the desired Section as shown below.

                                               

  • Then copy the below mentioned script in that text box and preview.
“<div><a href=”#” onclick=”return PersonalizationEditor.removeDefaultSelection(false)”>Clear Filter</a></div>”

 

In the above script the minibuttonOn creates a button and the onclick is an event which clears the default selection on the click of this button. Also, dont forget to remove the ” ” from the above code.

                                         

Now, save this page and clear the default selections on button press… :)

Happy scripting…


9 Comments »

  • Jayadev Swain said:

    Thanks!

    Works just fine… Nice piece of script.

  • Naga Swapna said:

    Hi,

    Your posts are very Nice and Keep Posting.

    This Script is Browser dependant and it won’t work in some cases.Try to use the Below Script to Clear all the Cascaded dashboard Prompts at a single Click.

    Clear All

    I got a different requirement where in My clear Button Should always appear next to the Go Button,I tried debugging the source code for the Dashboard Prompt and the Go Button, Any idea where to put this code in the Backend files to achieve this.

    Its an urgent req, Any help would be much appreciated.

    Thanks in Advance…

    Regards
    Naga Swapna

  • Naga Swapna said:

    Hi,

    Please add the below code:
    followed by your code.

    If you want to clear all the cascaded dashboard prompts at a single click, Please use Clear all instead of Clear filter.

    It works fine.

    Thanks & Regards
    Naga Swapna

  • Naga Swapna said:

    Please find the below Script and remove the double quotes while placing in a text box dashboard object.

    Clear All

    Regards
    Swapna

  • Rohit (author) said:

    Hi Naga

    Can u put the whole code.. it will be helpful for the readers…

  • Naga Swapna said:

    Hi,

    Can somebody help me in posting the Script, while I’m posting the Script it is getting converted to the button “Cear All”

    Regards
    Naga Swapna

  • Naga Swapna said:

    Hi All,

    Please use this code and enclose with tags

    div class=”XUIPromptEntry minibuttonOn”>
    Clear All</a Please close the tags herefor anchor

    Regards
    Naga

  • Naga Swapna said:

    Hi All,

    Please find the below code to make a Clear all button to clear all the selections from the Cascaded prompts in the Dashboard.

    [code]
    Clear All
    [/code]
    And this works fine for me.
    Let me know if anyone has any diff Solution for this.

    Regards
    Naga Swapna

  • satish said:

    can you plese tell me the steps what you had done .

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.