I have an excel file with some rows in it. I need to send an email for each row, sounds like a simple thing, actually.
I am using For Each row activity for this and this works for the TO and Subject fields (Send SMTP activity)
Since I have a customized text for the body (html) and parameterizing some entries, I decided to use String.Format(str_EmailBody, row(“display name”), row(“username”), row(“request id”))
somehow using this does not work for the body, it doesn’t move to the next row and keep on using the same information in the 1st row.
Any solution anyone can share is highly appreciated!
You could for the test build similar table using Create Table activity. And write to it couple of rows from excel. Then based on this table in debugging process you will see which values are taken. Maybe this will help somehow.
Fine
may i know what is assigned to str_EmailBody variable
if possible can i have a screenshot of it
we need to have three place holders like this {0} {1} {2} only then the values i.e., the arguments we have passed like row(“display name”), row(“username”), row(“request id”) will be placed in that place holder
This one looks good
but i have a small query like are we trying to send this text as HTML
if not kindly remove the html tags and try once if possible
Cheers @Twits_Rombaoa
yes, the email must be in html, but for testing purposes i unchecked isBodyHTML properties, unfortunately, it’s still the same, the To and Subject is working fine but body for all emails contains only the 1st record.
i think this is a bug already wondering if UIPath is even aware of this hehe
i wonder why it didnt work
the values will surely be placed in the respective place holders mentioned in string.format method
hmmm. strange
Cheers @Twits_Rombaoa
the values were placed in the right order, that is correct, but the thing is it doesn’t move to the next row to fetch the next set of values, just keep on using the values of the 1st row.