How to compare two string variables with IF command?

Unanswered Question
Apr 9th, 2008

two variables,



1. get the digits into 'db_get_account' from 'Get Digit Sting' command

2. get the string into 'db_account' from 'DB Get' command

3. now I want to compare the two variables with 'IF' command to processing the next step when matches. I have no luck with 'IF(db_get_account == db_account)'

How to compare the two strings with IF command?

Thanks in advance,

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)

You will be inside the Expression Editor working in Java. You want to see if two strings are equal, hence you must use the method on the Java String class. The Expression Editor will help you do this. I typically do a case insensitive match with the following method on the String class:

public boolean equalsIgnoreCase(String anotherString)

if (s1.equalsIgnoreCase(s2)) ...



cjrchoi11 Thu, 04/10/2008 - 12:58

Hi Geoff,

I still no luck with the IF command.


**caller input '12345' and store into 'db_get_account', and 'db_account' get string '12345' from database successfully but not hit the TRUE logic.

do I need something to do with boolean?

Thanks, John


This Discussion