Escape Characters in String Help with Filter Option in GetOutlookMail Activity

Hello All,

I’m able to get the SQL String but I’m not sure how to escape everything to make sure it’s valid in the Filter box option in the activity:

(“urn:schemas:httpmail:fromname” LIKE ‘%test@gmail.com%’ AND (“urn:schemas:httpmail:datereceived” >= ‘3/28/2021 8:45 PM’ AND “urn:schemas:httpmail:datereceived” <= ‘3/28/2021 8:46 PM’))

I tried this: (Basically putting double quotes around for every " or ')

“@SQL= " +”(“”“urn:schemas:httpmail:fromname”“” LIKE “'”%test@gmail.com%“'” AND (“”“urn:schemas:httpmail:datereceived”“” >= “‘“3/28/2021 8:45 PM”’” AND “”“urn:schemas:httpmail:datereceived”“” <= “‘“3/28/2021 8:46 PM”’”))"

Not working and I couldn’t find a compiler to help me out online.

Thanks!

Best Regards,

@Shawn_Ngoh

You don’t need to take Like outside of string…

Refer below link and do the update to your filter…

Download and paste the string as it is to your filter,
Just change the required date and from email id…

OutlookFilter From And Date.txt (198 Bytes)

Unfortunately the filter on email address did not work. I wonder if it’s cause in Outlook the email address doesn’t show up?

Is there a way to call on the UID with the filter property in the Get Outlook Message activity? Similarly I want to assign the UID to my queue item specific content so that I can refer to the right UID.

What is the result?

Did you get any exception?