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?