Category Archives: JavaScript

Cognos Prompt Numeric Range Validation

Cognos only supports two type of text box prompt validation; required and numbers only. In both cases Cognos evaluates the text input in real-time. If the validation fails, the prompt gets an orange dashed line underneath it and the Finish button is grayed out. The required validation fails if the prompt is empty and the… Read More »

JavaScript: Running Code Only Once

Every time Cognos refreshes or reprompts a page any custom HTML objects and the JavaScript they contain are reevaluated and run again. There are times you may want a piece of JavaScript code in a Cognos HTML object to only execute one time. For instance, you may be setting initial default values or instantiating objects… Read More »