04-09-2008 09:53 PM - edited 03-14-2019 02:04 AM
two variables,
-db_get_account,string,""
-db_account,string,""
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,
04-10-2008 09:20 AM
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)) ...
Regards,
Geoff
04-10-2008 12:58 PM
Hi Geoff,
I still no luck with the IF command.
if(db_get_account.equalsIgnoreCase(db_account))
**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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide