COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: eliza_jane on 15 Nov 2013 12:20:15 AM

Title: Prompt API addValues function
Post by: eliza_jane on 15 Nov 2013 12:20:15 AM
I tried using the addValues prompt function to add a set of new values to a value prompt but that does not seem to be working.

Here's the simplified version of the script to add a static test value:

<script>
var oCR = cognos.Report.getReport("_THIS_");
var p = oCR.prompt.getControlByName("prmpt");
var oValues = [{'use': 'test'}];
p.addValues(oValues);
</script>

has anyone else used the addValues function successfully? Am I missing something? 

If I set the use value to an existing value in the prompt then addValues behaves like setValues. So does addValues add new values or does it just set values?