Solved Can I format an email that "iterates" through a collection?

cferrone256

New Member
Hello,

I'm currently working on a process that reads in a series of virtual machines from an excel sheet, finds their respective states, and stores them together into a collection (Excel Bot Names). My goal is to send out an email displaying each machine's name and it's respective state, so I can be alerted if there is a malfunction of sorts. I'm wondering if it's possible to reference my collection in my email in a way such that each column will be iterated to completion. The reason I'm looking to use this method is to introduce some scalability to the project (I may be dealing with a larger number of virtual machines in the future and I would like this process to still function for all of them). I would like the body of my email to look something like this:

"Hello, your weekly bot status update has been completed." & NewLine() &
[Excel Bot Names.Bot Names]{1} &"'s state: " & [Excel Bot Names.Bot Statuses]{1} & NewLine() &
[Excel Bot Names.Bot Names]{2} &"'s state: " & [Excel Bot Names.Bot Statuses]{2} & NewLine() &
[Excel Bot Names.Bot Names]{3} &"'s state: " & [Excel Bot Names.Bot Statuses]{3} & NewLine() &
etc.

Thanks.
 
Last edited:
Top