COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Hardik Binnani on 07 Jul 2020 01:27:50 PM

Title: Add data to a value prompt using javascript in Cognos 11
Post by: Hardik Binnani on 07 Jul 2020 01:27:50 PM
Hello Everyone!

I am very new to post in this portal. Always been a silent reader. :)

I would like to know if we can add data in a value prompts using java script? The data doesn't come from any query subject, but hard-coded in java script?

Thank you,
Hardik
Title: Re: Add data to a value prompt using javascript in Cognos 11
Post by: dougp on 08 Jul 2020 05:32:42 PM
Yes

https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/ValuePromptControl.html
Title: Re: Add data to a value prompt using javascript in Cognos 11
Post by: Hardik Binnani on 10 Jul 2020 06:20:57 AM
Thanks Dougp for your response.

Actually, I am not much familiar with java scripting and I am trying to swim hard in this ocean.

I have a prompt named 'country'. And if I want a display value: 'US' and use value: 1; how would I achieve it in JS?
The reference that you have provided, I have gone through it, but not able to develop a code for it.

Thank you!
Title: Re: Add data to a value prompt using javascript in Cognos 11
Post by: Hardik Binnani on 19 Jul 2020 09:23:02 AM
Hello! Can anyone please help me with this.. I am still struggling to achieve the solution..