I am using save email attachments activity to download the attachments.
My scenario is :
Save the required attachments from Email. If Pdf is available, we are downloading the Pdf files, else download excel file.
for above scenario i gave below code If(currentOffice365Message.Attachments.Any(Function(x) path.GetExtension(x.Name).ToString.ToLower.Equals(.pdf)),.pdf,“.xls”)
It is working if attachment extension is .pdf or .xls.
If attachment extension is .PDF means it is not working. How to fix this.
I tried with this query If(currentOffice365Message.Attachments.Any(Function(x) System.Text.RegularExpressions.Regex.IsMatch(x.Name, “.pdf$”, RegexOptions.IgnoreCase)), “.pdf”, “.xls”)
The problem isn’t the expression, it’s that you only have designated the lower case extensions in the resulting filter and have not defined the filter properly.