Friday 22 April 2011

Search & Suggest Prompt in Cognos8.4

If you need a Google-like Select and Suggest Prompt like this:

selectNsearch

(type in the first characters and Cognos will complete it with suggestions), just perform the following steps:

1. Create a prompt page
2. Insert a value prompt object
3. Name it something like 'dummy'
4. Skip the step 'Create a parameterized filger' (uncheck the box).
5. Create a new Query (Selecion Query for dummy)
and select the value to use and the value to display
(for example, city code and city name).
6. Set the properties of the value prompt:
- Required: No
- Visible: No
= Name: prmt
7. Insert a text box prompt (do not use the wizard, click op finish). Name: p_txt
8. Add three HTML items to the right of the text box:

1:



2:



3:



9. Complete it by adding a query with the filter (like city code = ?city?)
10. Configuration of the first Javascript:
 this.actb_lim = 4;    // Number of elements autocomplete can show (-1: no limit)
 this.actb_firstText = false; // should the auto complete be limited to the beginning of keyword?
 this.actb_startcheck = 1; // Show widget only after this number of characters is typed in.

3 comments:

  1. Marc, great solution, very helpful. However, for some reason I'm only able to get the USE values to show up in the list. Your example seems to demonstrate the display values showing up in the list.
    Is there a setting in the scripts that toggles between USE and DISPLAY values?

    ReplyDelete
  2. Unable to see images in your post ... Can you please assist.

    ReplyDelete
  3. I tried this for Cognos 11 but where report is getting validated succcessfullly but no output is coming. Please also explain this about the Step 10.

    ReplyDelete

Thanks for your comment.