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

Restricting values for text box prompt

Started by jayatu, 28 Oct 2014 02:29:52 AM

Previous topic - Next topic

jayatu

Hi,

Is it possible to restrict what values that can be entered in a Text Box prompt in Cognos without using any Javasript?

Say I want the user to enter only a Positive Integer value, is there any feature to achieve this. In the prompt properties I can set "Numbers Only" as YES, but this does not solve my requirement as though it restricts any alphabet or special characters it would still accept Negative & Decimal values.

Thanks & Regards
Jayatu

BigChris

I can't think of a way to directly do what you want, but could you come at the problem from different angle? For example, I'll amke an assumption that a negative value is nonsense and that if the user enters a number with a decimal element you just want to take the integer part - in your filter you could then have something like:

(?parameter? > 0  and [Data Item] = int(?parameter?))

cognos810

Hello Jayatu,
This will solve your purpose without the use of javascript, but the user will have to come back to the prompt page to rectify his mistake.
-Let the user make an entry in the text box, and once he hits on finish button, conditionally render a page that tells the user about the mistake and gives a "Back" button. This will take him back to the prompt page.
Other than that, Javascript would be a good solution for an in-place validation.

-Cognos810