promptmany

Prompts the user for one or more values or members. Only "prompt_name" is required. The datatype defaults to 'string' when it is not specified. The prompt is optional when "defaultText" is specified. "Text", when specified, will precede the list of values. "QueryItem" can be specified to take advantage of the prompt information properties of "queryItem". "Trailing_text", when specified, will be appended to the list of values. When the data type is 'memberuniquename', a multi select member prompt is created. It is good practice to provide a default value, as 3rd argument. The default value must be a valid member unique name; it can also be an alias that references a member unique name as done in Report Studio.

Syntax

promptmany ( prompt_name , datatype , defaultText , text , queryItem ,
 trailing_text )

Example 1

select . . . where COUNTRY_MULTILINGUAL.COUNTRY in ( # promptmany (
 'CountryName' ) # )

Result

select . . . where COUNTRY_MULTILINGUAL.COUNTRY_CODE in ( 'Canada' , 'The Netherlands' , 'Russia' )

Example 2

select . . . from gosales.gosales.dbo.COUNTRY_MULTILINGUAL 
COUNTRY_MULTILINGUAL , gosales.gosales.dbo.COUNTRY XX where 
COUNTRY_MULTILINGUAL.COUNTRY_CODE = XX.COUNTRY_CODE # promptmany (
 'Selected CountryCodes' , 'integer' , ' ' , ' and 
COUNTRY_MULTILINGUAL.COUNTRY_CODE in ( ' , '' , ' ) ' ) #

Result

select . . . from gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL , gosales.gosales.dbo.COUNTRY XX where COUNTRY_MULTILINGUAL.COUNTRY_CODE = XX.COUNTRY_CODE and COUNTRY_MULTILINGUAL.COUNTRY_CODE in ( 'Canada' , 'The Netherlands' , 'Russia' )

Example 3

set ( #promptmany ('myProduct', 'memberuniquename', '[Camping 
Equipment]', '', '[Sales].[Product].[Product].[Product line]')#)

Result

set([Sales].[Product].[Product].[Product line]->[all].[1]; [Sales].[Product].[Product].[Product line]->[all].[2])