I’m getting stuck with the following scenario. I’m using a For Each Row in Datatable activity to read each line and subsequently filter for all invoices which have the same Customer Number and Email Address. An example data table I get is as follows:
The aim is to only send one email once to this email address which contains a data table containing the 2 records. My current workflow is sending an email twice capturing the same information. Would appreciate any advice!
Hi @copy_writes , if I remove duplicates, wouldn’t that mean I won’t be able to add the 2nd line (where Invoice Number = 289918) in my email? The aim is to advise the customer that they have these 2 invoices outstanding
Hi @Yoichi ! The code you provided would work. I’m keen to use it and I’ve tried incorporating it into my existing workflow but am getting stuck at the ‘Send Outlook Mail Message’ bit. How do I get Uipath to only email the grouped entries once? When I run my existing flow, it still emails the same customer twice since there are 2 invoice entries in the data table. Currently this is how my code looks like:
Thanks @Yoichi ! I realised I should have done that shortly after. It worked!
I have one last question, I’m using Create HTML Content to send the email to the customer in html format. Do you know how I can get the fields such as Invoice Number and Invoice Amount to appear in the body? I used the datatable ‘dt’ but it displays the entire data table instead of just the invoices specific to that customer and email address.
If you could post more details on that as a FAQ / do a video on that… I’ve read that multiple times and am not sure I really get it. But I know that the more you can do things like that in a few minutes, it greatly advances your developer skills. How did you learn that / do you have tips for understanding that?
Actually, I didn’t understand it at first. In my case, I deepened my understanding by reading basic LINQ expressions and actually writing and running repeatedly.
Now @ppr is working on making documents for LINQ (as the following, for example), and it will help us better understanding LINQ, I think.