COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: bighalf on 16 Mar 2014 11:03:23 PM

Title: Detail Filter to Left part of Multi Select Prompt
Post by: bighalf on 16 Mar 2014 11:03:23 PM
I'm trying to apply a detail filter that is linked to a multi select enabled text box prompt.

Ultimately I want the user to paste in a list from excel, select add/finish, then cognos to filter to this list however only the first 6 digits/letters of the values. I have values in the db that are the first six digits of the 10 digit numbers being entered.

Whenever I try to apply the filter I either get an error, or cognos overrides my multi selector to only allow a single value.

I hope this makes sense, any help would be appreciated.

Title: Re: Detail Filter to Left part of Multi Select Prompt
Post by: Lynn on 18 Mar 2014 08:57:56 AM
I believe that the text box multi select is going to make a comma delimited list of values available for filtering via an "in" operator such as


[YourDataItem] in ('1234567890','abcdefghij' )


It would be complicated to attempt to substring the first 6 characters out of each entered value. It doesn't load them up as individual elements that you can manipulate. Using the external data feature might allow you to gain more flexibility.
Title: Re: Detail Filter to Left part of Multi Select Prompt
Post by: bighalf on 23 Mar 2014 10:07:46 PM
Thanks for the reply. I had worked around it by concatenating digits to the data item rather than manipulate the prompt value using a few 'or' statements in my filter. Because the last four digits are always within a range, I got lucky this time.

I even tried to create a separate query to list the inputted values to filter to (then I'd've substringed those values) but this again forced the textbox prompt to only allow one value.

I'll do some research into the External Data piece as that might come in handy if I encounter the problem again.

I guess if it comes up again and I don't know of another way, I could build a tween excel sheet to have an input/output list which can trim off the unwanted characters. Not as slick as I'd like but oh well.