Thanks again, Udele, that worked. Guess I've been doing Java for too long and forget about single quote syntax in JavaScript. I was really thrown by the fact that "true" (no quotes) worked, but now I realize that is a reserved word in JavaScript.
Regards, -Tommy -----Original Message----- From: Udele Malabanan [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:28 PM To: JMeter Users List Subject: RE: Syntax for Condition in If Controller? Have you tried using single quotes? This condition works for me: '${abc}' == 'Alphabet' -----Original Message----- From: Johnson, Tommy [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 3:18 PM To: [EMAIL PROTECTED] Subject: Syntax for Condition in If Controller? I'm running JMeter 2.0.1 now, and having great difficulty with the syntax of the "Condition" field of the If Controller. The only way I've managed to get it to evaluate as TRUE was to put the string "true" in as the Condition. I can't figure our the JavaScript syntax it wants to execute a conditional. What is the correct syntax to compare a JMeter variable to a static string and return a boolean? I want to compare my variable ${res} to the string "ERROR", and return true if they are equivalent. I tried these syntaxes: "${res}"=="ERROR" ${res}=="ERROR" ${res}==ERROR ${javascript(("${res}"=="ERROR"),foo)} ${javascript((${res}=="ERROR"),foo)} ${javascript((${res}==ERROR),foo)} I also tried setting the value of ${res} to "true" directly and simply putting "${res}" as the Condition, but that did not work either. Only hardcoding the condition as "true" caused the samplers under the If Controller to run for me. Thanks in advance! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

