Friday, December 16, 2011

OBIEE10g Auto Suggest Prompt

A client asked me if I could create an auto suggest prompt for him. (ie: Google Style Prompt). Basically he wanted an edit box prompt which would fill an suggestion box which he could tab trough to make the right selection.

Since this isn’t a standard 10g functionality I wrote some JavaScript to make it happen. But I didn’t reinvent the wheel Knipogende emoticon ! The people at jQuery already did the bases, I simple adapted it for usage in OBIEE 10g.

1. Download the jQuery UI package here. Install it in your b_mozilla directory’s (or other webserver dirs you use).

2. Download the jQuerySetup from here.

3. Add the setup script to a textbox on your dashboard page:


Alter files locations if needed, don’t forget the Contains HTML Markup checkbox.

4. Add a dropdown prompt to your dashboard page.


5. Create a javascript file in your b_mozilla directory’s called: autocomplete.js

function SetAutoComplete(PromptColumn){
    var domNode = document;
    var tagName = '*';
    var tags = domNode.getElementsByTagName(tagName);
    var y ="";           
    for(i=0; i<tags.length; i++){
    if (tags[i].className  == 'GFPFilter') {
        if (tags[i].getAttribute('gfpbuilder').indexOf(PromptColumn) != -1)
            y = tags[i].getAttribute('sid')           

                $( "#"+y ).combobox();           

6. After the dropdown prompt add a textbox with:

<script src="res/b_mozilla/autocomplete.js" language="javascript"> </script>
<script language="javascript"> 
    SetAutoComplete('C1  Cust Name');

7. Add your report and run the dashboard:


Till Next Time


Michal Novy said...

How can you port it to the 11g?

Vanda said...

Hello! :)

First of all, I want to thank you for taking the time to create this blog. I find it very helpful and I come here often to find information about OBIEE and your posts are always enlightening :)

This is the first time I have a question for which I can't find an answer in your blog and so I was wondering if you could help me, I hope you don't mind me asking it here.

I have a report with a prompt for a report date, which appears as a drop-down list. The report date list has grown too much and now it displays "Too Many Values", so I thought I would split the date field in 3 prompts, one with the Year, another with the Month and the other with the full Date, constraining the Month to the Year value and the Date to the Month and Year values.

The problem is that when I'm applying the YEAR function to the date field, the year is displayed with a thousands separator and I don't want that, because it's a year and not a "number". I've tried but I can't find a way to fix this... Do you have any idea of how I can fix it?

Thank you!

Kwl_PranayJain said...

Hi John,

Do we have a work around for Multi Select as well.?? As in searching for data in a multi-select.. Please suggest me if there is a way.. or where do i start to customise the code for workaround

Leigh said...

very nice!!!

Manohar Paleti said...
This comment has been removed by the author.
Manohar Paleti said...
This comment has been removed by the author.
Manohar Paleti said...

Manohar Paleti said...

HI Sir,

I Knew a simple Thanks never fulfill your effort .. so Tons and Tons of thanks for your blog.


you can eliminate 'too many values' in prompt by adding below tag to instanceconfig.xml


Change the numeric value to appropriate value

Manohar Paleti said...
This comment has been removed by the author.
Christian said...

Very nice John.

I didn't see this when it was originally posted. JQuery rocks!

Anonymous said...

I have blogged about using JQuery to improve OBIEE UI. Please visit

kk said...

now am download link of j query . bt its version(higher) is different . so could not show auto suggest prompt