Question
Remove duplicates from text property
Hi ,
I have a RD run in an activity which pulls information like below table
WO ID | Status | Trasaction | Business Analyst |
---|---|---|---|
p-1 | pending | 123 | abc |
p-2 | pending | 23 | bcd |
p-3 | pending | 45 | abc |
I have requirement to send email to business anlayst pulled form the above report.
I have used obj browse to open business analyst email based on the name of BA populated in the table.
But if there are 2 rows having same BA's , TO property(Mode:text) which iam going to use in sendsimpleemail is populating as abc@gmail.com;bcd@gmail.com;abc@gmail.com
I dont want repeating email address in the To property.
rather i want To property to be populated as abc@gmail.com;bcd@gmail.com by removing any duplicates email address
How to achieve this requirement?
***Edited by Moderator: Pallavi to update platform capability tags***
Hi Bhargav,
Sharing some of my thoughts. I didn't get a chance to implement similar requirement. So you can wait for any better suggestions also.
Option 1 - You can try using removeDuplicatesFromList and/or pyRemoveDuplicatesFromPagelist and see if it helps to remove duplicate records from RD result based on Business Analyst column.
Option 2 - If you are already looping through RD results, add BA values to a new page list. Before adding check IsInPageList. Since we have this check this list won't have duplicates. Get BAs from this new page list to get email address.
Option 3 - Create another RD with same filter but have only Business Analyst column in result. Select Remove duplicate rows check box in RD. Use records from this RD result to get BA for getting email.
Option 4 - Split the email string using whatComesBeforeFirst and whatComesAfterFirst functions and copy each email to a page list. Check IsInPageList before adding to PageList. Loop through this page list to create email string again.