Hi Yugandhar,
You could get unique list using Macro functions. But you can't use them with the data coming from a datasource.
You can try to use Cognos functions substring_regex, positions_regex and occurence_regex
. Unfortunately, Cognos implementation of Regular Expressions is somewhat limited.
Your best bet is to use your DB Regular Expressions if they are available.
------------------------------
Andrei Istomine
Open to work - anything Cognos
https://www.linkedin.com/in/andreii/------------------------------
Original Message:
Sent: Mon August 19, 2024 08:10 AM
From: Yugandhar Jebiti
Subject: How to remove the duplicate email id's in string data type field
Hi Andrei,
The Concatenated String stored in "Data Item1", More details are attached.
------------------------------
Yugandhar Jebiti
Original Message:
Sent: Tue August 13, 2024 10:48 AM
From: Andrei Istomine
Subject: How to remove the duplicate email id's in string data type field
Is this Concatenated String stored in the Column of a Data Source?
------------------------------
Andrei Istomine
Open to work - anything Cognos
https://www.linkedin.com/in/andreii/
Original Message:
Sent: Sat August 10, 2024 11:58 AM
From: Yugandhar Jebiti
Subject: How to remove the duplicate email id's in string data type field
Hello Dear Expertise,
I need your expert suggestions for removing duplicate email addresses in a concatenated string with comma-separated email addresses in the Cognos report (version 11.2.4).
Eg: abc@gmai.com, def@gmai.com, and abc@gmai.com,
Expected result is: abc@gmai.com, def@gmai.com
I tried using macro functions like the one below. However, I encountered an error.
1.unique ([Query2].[Data Item1]
2.#unique ([Query2].[Data Item1]#
3.# csv ( unique ( array ( [Query2].[Data Item1 ) ) ) #
Regards,
Yugandhar J.
------------------------------
Yugandhar Jebiti
------------------------------