COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: pwchristian on 15 Jan 2025 02:48:24 PM

Title: Event Studio Question
Post by: pwchristian on 15 Jan 2025 02:48:24 PM
Hey everyone, could anyone help tell me if this is scenario is possible please?  If you have an event that, for example, the expression looks for orders that were created in the database in the past 5 minutes. 

Then there is a task to run a report, passing the order parameter to the report with method "as an item", and another task to auto-email you the order # in the subject line and attach the report to the email.

The report's query is just:  select order from orders_table where order = #prompt('Order')#

This works until there's multiple order created within 5 minutes.  For instance, if there is 2 orders ,I will receive 2 different emails with subjects ORDER1 and ORDER2, but the attached report in both emails will only run the query for ORDER1.

I appreciate any help please

Title: Re: Event Studio Question
Post by: dougp on 16 Jan 2025 11:22:02 AM
Did you try
in promptmany()?
Title: Re: Event Studio Question
Post by: pwchristian on 16 Jan 2025 02:49:00 PM
Yeah I tried it but I have the same result. Any other ideas? 
Title: Re: Event Studio Question
Post by: pwchristian on 16 Jan 2025 03:45:16 PM
The google AI bot does say it's possible but I don't see this part configurable in Event Studio "Within your event agent logic, iterate through each event instance in the event list".  Any idea what this is?

Google:

To pass multiple event instances to multiple reports in IBM Cognos Event Studio, you can create an agent with a single "Run a Report" task that is configured to accept multiple prompt values, then loop through each event instance in your event list, passing the relevant data as prompt values to the report when executing the task for each event.
Key steps:
Set up the report with appropriate prompts:
Ensure your report has prompts that can handle multiple values, allowing you to pass data from multiple event instances at once.
Create an Event Studio agent:
In the "I want to" section, select "Add a task" and choose "Run a report".
Select the desired report and configure the prompt values under "Options" to "Use an item" from the event list.
Loop through event instances:
Within your event agent logic, iterate through each event instance in the event list.
For each event, extract the relevant data that should be passed as prompt values.
Set these values as prompt inputs for the "Run a report" task.
Title: Re: Event Studio Question
Post by: dougp on 17 Jan 2025 10:20:37 AM
That looks like instructions.  I don't use Event Studio much so I figured it was time for a refresher.  Coupling those instructions with some help from the Cognos Analytics documentation, I was able to do what you requested.  What part are you unable to follow?