Hello all,
I am trying to add activities to the emails that contain the word “invoice” in the subject only.
In the condition box, I have added:
mail.Subject.Contains(“invoice”)
However it doesnt take up any email with subjects that contain “Invoice” or “INVOICE”.
Is there any way for me to make the String value in .Contains case insensitive?
Hi @bradley.kim,
Two ways can check using if condition
1.mail.Subject.ToLower.Contains("invoice")
2.mail.Subject.ToUpper.Contains("INVOICE")
You can use any one.
If suppose “invoice” string also coming in dynamically use below
1.mail.Subject.ToLower.Contains(strVariable.Trim.ToLower)
2.mail.Subject.ToUpper.Contains(strVariable.Trim.ToUpper)