on 04-25-2011 5:14 PM
I need to write a try catch method wrapped around this logic, in the try though I am checking to see if z7 is true then return DUNS then a catch statement that will return "FALSE", but for some reason z7 s not looking for the boolean true it is looking to find a string true, how do I get it to recognize booleon? and write the try catch?
String soldTo = "";
soldTo = CommonFunctions.executeValueMapping(z1[0],z2[0],z3[0],z4[0],z5[0],z6[0],z7[0],z8[0], container);
for (int i =0;i < z8.length; i++) {
if (z7<i>.equals(true)){
result.addValue("DUNS");
}
else{
result.addValue("false");
}
}
Try this logic
What is the data type of Z7 ? is it boolean or string?
If it is boolean then code as
//if(z7) as given below...
if it is string then
//if(z7.equals("TRUE"))
try{
String soldTo = "";
soldTo = CommonFunctions.executeValueMapping(z1[0],z2[0],z3[0],z4[0],z5[0],z6[0],z7[0],z8[0], container);
for (int i =0;i < z8.length; i++) {
if (z7){
result.addValue("DUNS");
}
}
} catch(Exception e){
result.addValue("FALSE");
}
Edited by: Baskar Gopal on Apr 25, 2011 12:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.