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

All required prompts are full - validation in Cognos prompt api

Started by yoniw, 19 Jan 2014 09:16:10 AM

Previous topic - Next topic

yoniw

Hey all,
We are using Cognos 10.2.1 fp1, Linux environment, Vertica DB.

i have a FINISH button (we are using the new Cognos prompt api) in a template report,  and we use a reference component to this finish button in all our reports ( We use it for there is an onclick function which activates after clicking finish).

We have a problem dealing with empty required prompts - > how do i disable the FINISH button or alert to the user, if i see that there is a required prompt with no value? (regarding that the report using different prompts). Is there a way after getting the controls to see if required fields are empty?

This is the existing code:
<script type="text/javascript">
function myFinishDetails()
{
   var fw = cognos.Report.getReport("_THIS_");
   fw.sendRequest(cognos.Report.Action.FINISH);
}
</script>

thanks,
Yoni.

adik

you could set up all your prompts as optional
then get the list of prompts with getControls function
then for all prompts use getValues(true) function which will return all the values available in a prompt. and if one doesn't have any values then don't use it in the validation function

yoniw