NiesonF
1
I need to combine 2 sets of emails that i grabbed using “Get Mail” from outlook. One is capturing emails from the inbox and the other from drafts.
How can i combine them in an array or group together so that i can run a for loop on each item afterwards.
Package used: UiPath.MicrosoftOffice365.Activities
Hi @NiesonF
You can use the Concat() function
FullList = list1.Concat(list2).ToList
You must initialize the FullList first.
ppr
(Peter Preuss)
3
Assign Activity
arrCombined | DataType: Mail Array =
Failed_Emails.Concat(Draft_Emails).toArray
then it can be used e.g. within for each for looping
(with toList, we would do it, if List(of X) is preferred)
UPD1 - more details on: Mail Array
Mail Array in your above case:

UiPath.MicrosoftOffice365.Models.Office365Message[]
ppr
(Peter Preuss)
4
For more info about LINQ have a look here:
NiesonF
5
Thanks man. The solution was perfect.
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.