Search
Thursday, August 28, 2008 ..:: Forum ::.. Register  Login
 
  Forum  Templates  AutoTag  Compare string
Previous Previous
 
Next Next
New Post 6/1/2008 11:31 PM
  TrinhVu
4 posts
No Ranking


Compare string 

Hi,

 How can I compare the value of a variable to a string? For eg: <wr:if test=”${var1.showRate} == ‘Y’ ” > This fails. I got error
 
Y == ‘Y’ does not evalueate to Boolean result. I think it should give me true.

 And if ${var1.Rate} has the value 4 as 4== ‘Y’ it should give me false but it does not.  It says does not evaluate to a boolean result.

Please help

Trinh

 
New Post 6/24/2008 4:34 PM
  tomasr
9 posts
No Ranking


Re: Compare string 

Hi, Trinh

put the ${var1.showRate} in single quotes to indicate that it is a string, like '${var1.showRate}'

- Tomas

 
Previous Previous
 
Next Next
  Forum  Templates  AutoTag  Compare string
Membership Membership:
Latest New User Latest: louisedean
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 55

People Online People Online:
Visitors Visitors: 70
Members Members: 0
Total Total: 70

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement