COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: DaisySara on 18 Apr 2013 11:05:37 AM

Title: Value prompt
Post by: DaisySara on 18 Apr 2013 11:05:37 AM
Instead of grabbing values from a package object, how can I type in a list of values I want to display on my value prompt?
Title: Re: Value prompt
Post by: calson33 on 18 Apr 2013 11:07:49 AM
Select "Static Choices" in the properties of the object.
Title: Re: Value prompt
Post by: DaisySara on 18 Apr 2013 11:11:14 AM
So simple...thank you!!!!
Title: Re: Value prompt
Post by: DaisySara on 18 Apr 2013 11:14:44 AM
One more thing...is there a way to put in ABC order, without just having to enter all the values that way?
Title: Re: Value prompt
Post by: calson33 on 18 Apr 2013 11:52:12 AM
I don't know of any way to make them sorted other than to put them in that way.
Title: Re: Value prompt
Post by: RKMI on 18 Apr 2013 12:44:55 PM
Hi,

I agree with Calson no way to define a sort on static choices unless entering them that way. But, I have an idea and I would be curious to know if a Javascript item would help do a sort for static values.

Thanks,
RK
Title: Re: Value prompt
Post by: calson33 on 18 Apr 2013 12:52:26 PM
I have used javascript to sort listboxes before, but it seems like a lot of extra effort.

Another option would be to create some sort of unioned SQL query like:
select 'MY Display Val 1' d, 'my return val1' r from dual
union
select 'MY Display Val 2' d, 'my return val2' r from dual
union
select 'MY Display Val 3' d, 'my return val3' r from dual
union
select 'MY Display Val 4' d, 'my return val4' r from dual
union
select 'MY Display Val 5' d, 'my return val5' r from dual

This could be sorted by Cognos autmatically, and extra values could be easily appended to the end of the query.