Advanced Scripting - CriteriaMet - using a variable in the criteria field

Discussion forum for Enterprise Edition.
Post Reply
delta2
Posts: 42
Joined: Mon Dec 20, 2004 7:25 am

Advanced Scripting - CriteriaMet - using a variable in the criteria field

Post by delta2 » Thu May 30, 2019 7:39 am

Mailenable Enterprise 8.

I would like some more information as to how CriteriaMet works in Advanced Scripting. I would like to use a variable in the criteria field. Here are the results of some tests I made;

given that the header contains "aaabbbccc" and doesn't contain "qqq"

CriteriaMet([ME_HEADERS_CONTAIN],"*bbb*") ... true

CriteriaMet([ME_HEADERS_CONTAIN],"*bbb*" & "qqq") ... true (strange)

x = "*bbb*"
CriteriaMet([ME_HEADERS_CONTAIN],x)
... false

x = "bbb"
CriteriaMet([ME_HEADERS_CONTAIN],"*" & x & "*")
... false

Is there any way to use a variable as criteria ?

Thanks. Stuart

Post Reply