cancel
Showing results for 
Search instead for 
Did you mean: 

return a boolean as a string

Former Member
0 Kudos

This is what I have so far but I don't want to return a string (DUNS) I want to make it a little more flexible and basically if z7 equals "AVNETHMK" I want to return z7?

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("AVNETHMK")){

result.addValue("DUNS");

}

else{

result.addValue("false");

}

}

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If Z7 equals AVNETHMK then return string DUNS otherwise dont return anything... I believe thats what you want to do..

If so , try the below logic

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.equals("AVNETHMK")){
result.addValue("DUNS");
}
}