COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Esosa on 22 Jun 2020 03:19:20 PM

Title: List Macro for same input field
Post by: Esosa on 22 Jun 2020 03:19:20 PM
Good afternoon everyone,

So I have used macros slightly before with a single input prompt. Is it possible to put more than 1 input? I am aware I can use the textbox with a field filter, but sadly this is not an option. Trust me on this..

I have tried the promptmany I am not sure if that would be the right function?

Basically I want to input n amounts of account numbers and get output only on those accounts inputted inside the macros.


TIA
Title: Re: List Macro for same input field
Post by: bus_pass_man on 22 Jun 2020 03:20:59 PM
promptmany is what you would want to use if you want to allow your users to enter more than one value.
Title: Re: List Macro for same input field
Post by: Esosa on 22 Jun 2020 03:23:26 PM
Do you have a syntax example?

Here an example of my situation:


Employee No:

101
105
103
110
102

I want to input that list into the macros and get an output just like it was a multi-line-input textbox

select employee_no, person_fnm, person_lnm from Tablex1 where account_no in #promptmany('Employee_No')#