COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cpx2000 on 28 Nov 2015 05:27:43 AM

Title: Passing multiple values directly into to query
Post by: cpx2000 on 28 Nov 2015 05:27:43 AM
Hi everyone,

i am using cognos 10 with teradata

I would like to have an single input text field in the prompt page where the user can copy paste coma separated values of ID numbers and can be used directly in the an IN type filter

For example

user enters : 12312312,4321123 etc

and in my filter i have

[ID] in (?values?)

What syntax do i need in my filter to execute this ?

In addition , what would it be possible to have file upload of text file which new line separation and work in similar fashion ?
Title: Re: Passing multiple values directly into to query
Post by: dax on 01 Dec 2015 02:30:12 AM
Hi there

Assuming that you have a Text Box Prompt and a parameter named MyParameter then you should be able to use this in your report filter:

[The Field Name Goes here] in (#csv ( split ( ',',  prompt('MyParameter','token') ) ) #)

Hope that helps.

Cheers
Dax