COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 11 Mar 2014 02:48:46 PM

Title: Getting RID Of One or More Required Value Missing
Post by: gosoccer on 11 Mar 2014 02:48:46 PM
Folks,
I have to setup this prompt to optional but since it is a prompt that is referecing a parameter used in the Framework Model,unfortunately, I can't set it up to optional.
The problem is the reference to this parameter value inside the FM Model.
(XXX.SITE_ID = #prompt('XXX_SITE')#)

The java script I am using for submitting and finishing the report works great except it can not bypass this message I have attached.

The code looks like below,

if (datesDiff > 390) {
var msg = 'The date range cannot be greater than 13 months. ';
alert(msg);
} else if (startDateVal < disclaimerDate  ) {
var msg = 'show disclaimer';
alert(msg);
promptButtonFinish ();
}else {
   if ( canSubmitPrompt() ) {
   promptButtonFinish ();
   }
  }
}

If I create the Query and the parameter inside the report something like site_id=?site_id?, it works just fine and I
don't get this message at submit time.

Any help would be greatly appreciate it.
Title: Re: Getting RID Of One or More Required Value Missing
Post by: Ammus1234 on 12 Mar 2014 07:04:33 AM
You can make the prompt optional in FM.
Check this.
http://pic.dhe.ibm.com/infocenter/cbi/v10r1m1/index.jsp?topic=%2Fcom.ibm.swg.ba.cognos.ug_fm.10.1.1.doc%2Fc_topic_mandatory_optional_prompts.html
Title: Re: Getting RID Of One or More Required Value Missing
Post by: gosoccer on 12 Mar 2014 07:33:18 AM
WHOOM! Interesting,
DefaultText

This optional parameter is the text to be used by default. If a value is specified, the prompt is optional.
If you use a space and no values are provided in the Prompt Value dialog box, a Where clause is usually not generated.
If you use text and no values are provided in the Prompt Value dialog box, a Where clause is usually generated using the default

Do you by any chance has an example for NON-DMR, NON-DIMENSIONAL?
Thx so much
Title: Re: Getting RID Of One or More Required Value Missing
Post by: gosoccer on 12 Mar 2014 09:35:46 AM
Got it working using your recommendations. Thx so much!!