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

Set value to tree prompt

Started by Ammus1234, 05 Jun 2015 09:22:54 AM

Previous topic - Next topic

Ammus1234

Hello All,

Version: C 10.2.1 FP4

I want to set a value for tree prompt based on some other prompt value.
I am trying to achieve it using Prompt API.

But I could not achieve it for tree prompt, even though it works for value prompt.

I tried with the below script. I am getting use value of prompt 'tree' and trying to set the value for 'tree1'

<script>
var acme = {};
acme.getControl = function(promptName)
{
  var ocr = cognos.Report.getReport("_THIS_");
  return ocr.prompt.getControlByName(promptName);
};

acme.settree= function () {
var t1=acme.getControl('tree').getValues()[0].use;
var  set1= [{'use': t1}];
acme.getControl('tree1').setValues(t1);

    };

</script>

Can somebody please help?