How to allow comma separated values to be entered into a text box prompt ?

Use a filter expression to parse out the values. For example, a report has a prompt with parameter ?ParamZipCode? and is used to filter query item [Zip Code]

The filter expression would be as follows:

cast([Zip Code],varchar(200)) in ( #csv ( split(' ', split(',', split(' ,', split(' , ', split(', ', prompt('paramZipCode','token') ) ) ) ) ) ) # ) This filter converts the Zip Code to text and looks for the value IN a list of comma separated values. Due to the nature of the macro functions, the result of the function is a series of string elements. The cast function applied to a numeric field ensures that the appropriate data types are being used within the filter expression. The split() macro functions are in place to handle additional white space that users may enter between the comma-delimited values.

Comments

Popular posts from this blog

RSV-VAL-0032 expression is not valid. If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error ocurred at or near the position '0'.

How can you extract all user information from Cognos Access Manager Namespace Report Utility and create Cognos Report out of it?

BME-EX-0047 Unable to read preferences for the requested interface..