Get outlook mail filter with variables

Hi threre,

I’m struggling to get mails starting with a variable name.

For the variable word for example in sql it should be : like ‘word%’

I get a syntax error with the following code and I didn’t manage to fix it yet…

Here is my filter :

(not showing an error)

and after running :

Best regards,

@KurX - Is this same query posted here?

Indeed, I didn’t manage to delete the first topic

@KurX - I have added the variable as below and it worked…Please check…

“@SQL=”“”" like ‘“&StrSubject &”%’ AND urn:schemas:httpmail:fromemail = ‘’"

Thanks, it worked with this :

“@SQL=”“urn:schemas:httpmail:subject”" like ‘“&row(0).ToString &”%’ AND %last7days(urn:schemas:httpmail:datereceived)%"

Didn’t know that we can use & for variables.

Have a nice day !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.