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

value prompt's value changing

Started by venkiatmaruthi, 08 Dec 2010 02:48:26 AM

Previous topic - Next topic

venkiatmaruthi

Hi,

I have value prompt contain YEARMONTH.

Dev created a javascript to set this prompt value to 201012. Developer created init() to get that yeardate and calling that in
Quote<Body onload=init()>
Now the problem is__
1) user selects some other value in that prompt say eg. 201004
2) if the page refreshes the prompt value becoming 201012 again instead of 201004

I want 201004 even after the page refreshes

How could I achieve this?

CognosPaul

You have an HTML item on the page that triggers that JavaScript function. Every time the page is refreshed, if the HTML item is still on the page it will still trigger. What you need to do is to find a way to render the HTML item only when the paramValue is null.

Click on the HTML item that contains the init(). In the properties there is a row called "Render Variable". Click on the ellipse (...) for that row and select New Boolean Variable. Call it renderInit. The expression should be paramValue('YEARMONTH') is null (assuming YEARMONTH is the name of your parameter).

When the parameter is null, the HTML item will render, triggering the JavaScript. If the user selects a value the Boolean will resolve to false, and the HTML will not render.

venkiatmaruthi