Skip to Content
author's profile photo Former Member
Former Member

return a boolean as a string

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");

}

}

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 25, 2011 at 03:31 PM

    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");
    }
    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.