COMMENTS
This is kickass...thanks for the work...saved my day!
Hi
That was a gr8 post.
I used your function like this and it doesn't show me the alert message.
var y =searchPrompts("TEST_TEXT");
var z=y.value;
alert(z);
Where am I wrong?
Amazing! thanks a lot. You saved my day too.
Using this I am not able to display the date selected in a date prompt. Any other code to perform this?
Also, i would like to understand the whole concept of JavaScripts usage in Cognos 8.4. There are plenty of things that is available in our Cognos 8.1 and all shows a javascript error in Cognos 8.4. Please share any document that would be useful.
Mark,
Replace the line...
var z=y.value; with ...
var z=y.sGetValue();
It works but when the report has a Tree Prompt the function G_PM_THIS_.getControlByName
Returns an empty item. How do you recommend to solve this?
Hi i am using a propmt function to check if the checkbox is selected in cognos 8.4.
i am getting an error "cntlName.m_oForm.length" not defined. I am copying the script below can you please give the solution for it
function checkGroupingLevel(){
for(i=0;i<oCVRS.preProcessControlArray.length;i++)
{
cntlName=eval(oCVRS.preProcessControlArray[i]);
if(cntlName.m_oSubmit.name.toLowerCase() == 'p_department')
{
for(var j=0; j<cntlName.m_oForm.length; j++)
{
if(cntlName.m_oForm[j].checked)
{
document.formWarpRequest._oLstChoicesGroupingLevel[1].checked = true;
}
}
break;
}
}
promptButtonFinish();
}
Once you get the object back, what do I do with it? I don't know what the properties or methods are for the object.
Iam working on the audit page in cognos 8.2.I need to capture the filters/prompt used by the users.Iam running several reports.I need to capture prompts/filters used by each user.I have not done much on JS.Please let me know if you could help.
Thanks in advance
Hi,
great post indeed, could it be that for text, date and datetime prompts the prefix is not complete?
{
case "cognos.Prompt.Control.SelectValue": SpotOnPCPrefix="PRMT_SV_";
break;
case "cognos.Prompt.Control.Text": SpotOnPCPrefix="PRMT_";
break;
case "cognos.Prompt.Control.DateTime": SpotOnPCPrefix="PRMT_";
break;
case "cognos.Prompt.Control.Date": SpotOnPCPrefix="PRMT_";
break;
}
thanks!
Dieter
hi all,
i need java script for prompt hide show at runtime in cognos 8.4.
i have 3 prompts in prompmt page..
1.it is for selecting the year.
2.this prompt having static choices i.e External report and Internal report.
if user select External report dirictly list vl be dispalyed if user selecting the Internal 3rd promt must be enabeled the 3rd promt conatins 3 static choies ..
so how to hide and show promt at selection of Internal..
help me on this issue