If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Select and Search Prompt not working correctly in Cognos 10.2

Started by tm.ashok.khetan, 27 Oct 2014 08:48:34 AM

Previous topic - Next topic

tm.ashok.khetan

We have a report with following two sections (on the same page):

Section1:
------------
- 'Country' dropdown list
- 'City' dropdown list

Section 2:
------------

- Select and Search Prompt (text field, search button, results listbox, insert/remove buttons, choices listbox)

Issue:
--------
Here, the 'Country' is the 'Cascade Source' for 'City' field, i.e. when the 'Country' value is selected, the page refreshes and the 'City' list is populated.  I also have some JavaScript code which will reset the 'search text field' value to blank and clear the 'Results' listbox on 'Country' selection (code written in the onChange handler of 'Country' field).

I have the below scenario:

1. Enter a value in 'search text field' of SnS prompt and then click on 'Search' button. As a result, the matching values are populated in the 'Results' listbox.

2. Now the user, selects a value from 'Country' dropdown. As a result, the 'search text field' value is reset to blank, 'Results' listbox is cleared and the page refreshes. On the refreshed page, the 'City' dropdown will have the values populated and 'search text field'/'Resutls' listbox will be 'blank'.

This is how it works in Cognos 8.2. However, Cognos 10.2 is behaving differently  :(. In Cognos 10.2, even if the 'search text field' and 'Results' fields are reset, these will still have the values which were there when the 'search' was performed in step #1.

I tried various ways to clear the 'search text field' and 'Results' listbox under 'Select and Search' prompt and the fields get cleared 'OK' on the GUI; still when the page is rendered post refresh, the previous values re-appear in the fields.

A few ways to reset the 'SnS' fields are given below (these are able to reset the fields):

1. getFormWarpRequest().elements['_searchValue'].value = '';
2. The 'SnS' prompt is enclosed in a separate span tag. I got object of span tag first and then used getElementsByTagName() to get handle of 'search text field' and 'Results listbox, was able to clear these using this method as well:

My query is, why does Congos 10.2 retain the old values in 'SnS' prompt fields when the page is shown again after refresh?

Note: In the html source of browser, I noticed that within some JavaScript blocks, there are some objects (created by Cognos 10.2) in the form of 'G_PM_THIS_.F_ADD', where it populates the 'search text field' and 'Results listbox' values while showing the search results (step 1). Do we need to update this collection as merely updating the GUI fields is not clearing these values? If yes, then how can this be done?

Please help.