How to put multiple condition in one If statement

Hello all , I have multiple condition . like i want filter mail subject., like
i want to put this conditon in only one if .how should i do this? with OR ? with AND
please help me

Hi @dhanashree22

Think OR should be fine.


{"Invoice/bill","Invoice"}.Any(Function (x) item.Subject.Contains(x))

it checks for all items from the array if 1 or more items are contained within the Subject


I think only one condition is enough
That will be like


This will anyhow look for word “invoice” in the subject which is already covered before using .Contains(“Invoice/bill”)

So the condition with Invoice/bill is not required

But still if you would like to have those two then to cover this

Use a or condition like this

item.Subject.Contains(“Invoice/bill”) OR item.Subject.Contains(“Invoice”)

Cheers @dhanashree22

i used this condition but my pdf in save attachment not able to download

Try mentioning like this

item.Subject.ToString.ToUpper.Contains(“INVOICE/BILL”) OR item.Subject.ToString.ToUpper.Contains(“INVOICE”)

Cheers @dhanashree22

pdf are not able to download


First let’s check whether it is getting mailmessage object

Once after using the get outlook mail activity with a output variable named say out_mailmessage

Use a write line activity and mention like this


And see whether it’s greater than zero

And also check with get outlook activity property like is anything enabled like only unread mails


it read the email from updates not from Primary section.
I have pdf attachment in Primary section . it reads all mail from Update section.