If you are unable to create a new account, please email support@bspsoftware.com

 

Prevent unchecking of a specific static choice in checkbox group value prompt

Started by Priya25, 13 Jan 2017 03:13:26 AM

Previous topic - Next topic

Priya25

Hello folks,

I have been trying few options in Cognos 10.2 to disable unchecking of a specific static choice in a value prompt (UI type check box group), but it seems to be not possible without using javascript.

Can anyone let me know if something like this is possible?

My value prompt has static choices (Employee ID, Employee Name, Employee Status, Employee HireDate). I want Employee Name to be always selected as well as restrict/disable to be unchecked by end users so that Employee Name choice is always in the output.

Kind Regards

Kiran P

Hi Priya,

It is not possible in a multi select checkbox prompt without using javascript. If you want to show Employee Name in output by default and indicate that information to user, you may want to add a note on the prompt page, probably above or below the prompt itself.

Thanks,
Kiran

BigChris

Surely you can just remove it from the prompt altogether. You'll need to alter your filter accordingly...

Priya25

Kiran,
Currently what I have is a multi-select prompt. But can you share with me the javascript for how to do it for a single-select prompt. If it is possible this way, then I will split the prompts into 2 (Employee Name) and (Employee ID, Employee Status, Employee HireDate). And using the javascript would make the first prompt with Employee Name choice as unable to uncheck by anyone.


Chris,
Agree with you, ideal way would have been to remove the Employee Name from the selection choice itself and display a note on the prompt page that Employee Name will appear by default in output, but my end user wants it this as explained in my post :S

Thank you

Priya25

Hello All,

Can anybody provide me suggestions on this topic?

Kind Regards

bdbits

Leave the name in the prompt if you must, then force it to be included in your filter expression.

Using javascript in this way is bound to break down the road. Sometimes users are just wrong and you have to find a polite way to tell them it is either not possible, or ill-advised to do whatever they requested.

BigChris

My thoughts exactly. Your filter would probably end up looking something like:

[EmployeeName] in ?YourPrompt? or [EmployeeName] = RequiredName