I have a last minute request to build an automation in StudioX for multiple emails:
Example:
| NEW Comp Grade |
New Comp Grade Profile |
District |
Store |
Email Address |
Manager Manager Email |
| 12 |
12-USA Standard |
USA 1 |
Albertville |
joe |
joejoe |
| 15 |
15-USA 1 |
USA1 |
Albertville |
joe |
joejoe |
| 12 |
12-USA Standard |
USA2 |
Arundel |
arundel |
arundel1 |
| 12 |
12-USA Standard |
USA3 |
Wawa |
wawa |
wawa2 |
| 12 |
12-USA Standard |
USA4 |
7-Eleven |
you |
me |
| 18 |
18-USA 18 |
USA4 |
7-Eleven |
you |
me |
Multiple emails with different data to send in a single email. I don’t want to send an email for every line. This is urgent. Please HELP!!
You can try this approach
Use Excel File → For Each (group by Manager Email) → Assign EmailBody = "" → For Each Excel Row in CurrentGroup → Assign EmailBody = EmailBody + "Comp Grade: " + CurrentRow.ByField("NEW Comp Grade").ToString + ", Profile: " + CurrentRow.ByField("New Comp Grade Profile").ToString + ", Store: " + CurrentRow.ByField("Store").ToString + Environment.NewLine → End For Each Row → Send Email (To = CurrentGroup(“Manager Email”), Body = "Hi " + CurrentGroup(“Manager”) + “,” + Environment.NewLine + EmailBody) → End For Each Group.
Cheers
HarryKan
(Karry kan)
4
dtA = dtA.AsEnumerable.Concat(dtB.AsEnumerable).CopyToDataTable()
Poke_mon
(Poke mon)
5
Hey,
First get all unique email addresses into an array. You can find example linq below
emailArray = dt.AsEnumerable().
Select(Function(r) r(“Email Address”).ToString).
Distinct().
ToArray()
Then for each array element, filter your datatable by CurrentItem and get your grouped datatable