Hello all!
A simple question about prompts: if you have two value prompts, can you make only one of them required at runtime? I mean, the user should select a value in either one of them, but let him choose which one.
Thanks !
If you search ittoolbox forum, there is a javascript solution posted for allowing only one of the two prompts. If one is selected, another is automatically disabled.
From http://tinyurl.com/2axu7t (http://tinyurl.com/2axu7t) I got this :
These are some expressions I have seen in the postings here.
To refer to an element with ID = UID1, use expressions like:
var xxx = document.formWarpRequest._textEditBoxUID1.value.
var list=document.getElementById("UID1");
document.getElementById("_textEditBoxUID1").style.d isplay = ?none?;
Text Box Prompt = ?_textEditBoxUID1?
List Box Prompt = ?_oLstChoicesUID1?
document.formWarpRequest._oLstChoicesUID1[0].text = 'Select Product Name';
Which one do you usually use ? Thanks.
I haven't test that code above but here is one:
document.forms["formWarpRequest"].elements["_textEd itBoxPromptName"].dis
abled = true;
document.forms["formWarpRequest"].elements["txtDate PromptName"].disabled
= false;
Here are some posts discussing this issue:
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos-reportnet-l/conditionally-making-a-prompt-inactive-727556
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos-reportnet-l/report-studio-prompt-question-1554303
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos-reportnet-l/clear-a-prompt-by-selecting-another-1409238?ref=http%3A%2F%2Fsearch%2Eittoolbox%2Ecom%2Ftechnical%2Dgroups%3Fr%3Ddisable%2Bjavascript%2Bprompt