COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: MPritchard55 on 16 May 2014 03:44:22 PM

Title: Using parameter map values in query subject prompt to create dropdown list
Post by: MPritchard55 on 16 May 2014 03:44:22 PM
Hello!  I've seen related posts on this topic but have not been effective in applying any of the suggestions/solutions offered, so I thought I would present my particular case.  Any feedback would make me   :D.


What I'm trying to do:  create a dropdown list prompt (within a query subject) consisting of values in a Parameter map.  The function that I call in my query subject has 2 parameters - Popsel Name and Coupling Type.  Here is the query subject sql. 

Select
*
from TABLE(DU_ODS.DU_COUPLING_PTF.DU_COUPLING_PTF_F((#promptmany('Popsel Name', 'string', ' ', ' ', '[ODS].[DU_POPSEL].[POPSEL_NAME]')#), (#prompt('Couple Type','string', ' ', ' ', $[Coupling Types]{'?'})#)))

The first parameter (Popsel Name) is working as a dropdown list prompt, pulling the contents of the dropdown list from a query subject called Popsel_Name.  (Side note: to make this work, I had to add the Popsel Name query subject to the same namespace in the Business Layer where I am using the parametrized query subject, which seemed strange since the  '[ODS].[DU_POPSEL].[POPSEL_NAME]' path is actually at the Database Layer.) 

I want to create the same result with the 'Couple Type' but use the Values in the Parameter Map 'Coupling Types' as the contents of the dropdown list.  I can't seem to get the correct syntax.  The syntax above runs without error but doesn't produce a dropdown prompt.  It simply appears as a text prompt so the user must enter the appropriate options as text.  I don't have a lot of experience with Parameter maps, so hoping the solution is obvious to those who have.  I've read the documentation on Parameter Maps but none seem to use this sort of case example so...

Thanks in advance.  I've sunk a ton of time into this and know that an alternate solution is to create a table with my 4 'Coupling Types' values and follow same solution as for Popsel Name, but that seems like the easy way out.  ha! 
Have a great weekend!  M       
Title: Re: Using parameter map values in query subject prompt to create dropdown list
Post by: Tazo on 16 Jan 2018 05:03:09 PM
Hi,

I am trying to solve the same problem. I need to have the parameter map as a drop down in QS. Did you find an apt solution?