I need to set two conditions in “filter” in Get outlook mail message. One of them is sender’s email address and the other one is the message received in the last hour. I have already built two conditions and they can work separately. But if i tried to combine these two, it failed.
First condition(used for mapping to get email addresses in excel):
String.Join(" OR ", dtMappingAddress.AsEnumerable().[Select](Function(row) “[SenderEmailAddress]=” + “'” + row(“Email address”).ToString() + “'”).ToArray())
@abc0106
Dim filterCondition As String = “(” + String.Join(" OR ", dtMappingAddress.AsEnumerable().[Select](Function(row) “[SenderEmailAddress] = '” + row(“Email address”).ToString() + “'”).ToArray()) + “) AND [ReceivedTime] >= '” + DateTime.Now.AddHours(-1).ToString(“MM/dd/yyyy HH:mm tt”) + “'”
In StudioX: Double-click the Get Outlook Mail Messages activity, click the “Options” button next to the “Filter” field, paste the filterCondition string into the text box, and click “OK.”
In Studio: Set the Filter property of the activity to the filterCondition string.