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.
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
That's exactly what i did, thanks :)