Maliki4815
(Ammar Malik)
September 7, 2021, 6:19pm
1
I am trying to find an email from a collection, using
i) domain name and
ii) DateTime stamp
Two questions here:
While writing the relevant expression, the following error was encountered. Can someone assist in getting the syntax right?
How to include DateTime stamp in this expression?
The objective is to zero-in on one particular email object.
Note that mail_Messages is a collection of mail objects.
ppr
(Peter Preuss)
September 7, 2021, 6:24pm
2
Give a try on
mail_Messages.Where(Function (x) x.Sender.Address.Contains(“abc”)).toList
will a return a list of filtered items
Maliki4815
(Ammar Malik)
September 7, 2021, 6:48pm
3
Thanks, the expression does filter out a list. But here the objective is to zero-in on a particular email object using two properties: 1) Email domain 2) Email DateTime. Appreciate if you can share insight on this. I have also edited the question to make it more clear.
aanandsanraj
(Anandraj Rajendran)
September 8, 2021, 5:46am
4
Hi @Maliki4815
I hope the below code would help you
mail_Messages.Where(Function(m) m.SenderEmailAddress.Contains(“uipath.com ”) And m.DateAsDateTime>Now.Date)
Maliki4815
(Ammar Malik)
September 8, 2021, 1:49pm
5
It still gives a list; however by zero indexing I was able to get the target email object. Thanks.
system
(system)
Closed
September 11, 2021, 1:49pm
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.