I want to create a variable 'EmailList' which holds a string of email addresses. Something like 'MrDog@gmail.com;MissCat@email.com'
I have a collection containing a Title column, a TeamLeader column and a RegionalManager column.
Title is the name of a Store, such as 'Enfield'
The other 2 columns contain Name and Email. Each of these 2 columns may contain multiple entries.
The collection therefore looks like this:
Title TeamLeader RegionalManager
Enfield Name: Miss C Cat Email: MissCat@gmail.com Name: Mr W Wolf Email: MrWolf@gmail.com
Name: Mr D Dog Email: MrDog@gmail.com
Name: Martyn Burlace Email: MBurlace@gmail.com
I would like to get either all TeamLeaders or all RegionalManagers in the email variable.
The code I have used is as follows :
Set(EmailList,Concat(ForAll(AllServices.TeamLeader,Email),Value & ";"));
(I haven't yet filtered by Title as I want to get this working first)
Any help would be greatly appreciated.
Hi Rubin, thanks for your reply. I tried what you suggested and it came up with an error message. Eventually I settled on this:
Set(EmailList,Concat(AllServices.TeamLeader,Email & ";")) (without the ForAll)
The AllServices.TeamLeader bit is the table within the collection (AllServices) and Email is an entry within that table.
However I'm still getting the same result with the strange email addresses (+@.+\. etc..). When I look in the Collection the email addresses are fine (although some are blank, don't know if this has any bearing on matters).