Variable Array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • potterb
    New Member
    • Jul 2008
    • 1

    Variable Array

    I am trying to setup a attribute that will have multiple values in it.

    ViewObject voc1d = service.findVie wObject("GetCom mercialNeighbor ");

    ViewCriteria vcc1d = voc1d.createVie wCriteria();

    // Query the view based on session id
    ViewCriteriaRow vcr3d = vcc1d.createVie wCriteriaRow();
    vcr3d.setAttrib ute("SessionId" , mgSessionId);
    vcr3d.setAttrib ute("AddrType", "GEORESULTS ");
    vcr3d.setAttrib ute("BusinessSe gment","A");

    Where I have setup the BusinessSegment = A I would like to have the value for BusinessSegment s either be A, B or C. So What the results from business segment would be looking up from the query a value that has A B or C.

    Do I need to setup an char array for this or can I just add the values like this

    vcr3d.setAttrib ute("BusinessSe gment",("A","B" , "C"));

    Thanks

    Bob
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by potterb
    .. can I just add the values like this

    vcr3d.setAttrib ute("BusinessSe gment",("A","B" , "C"));

    Thanks

    Bob
    That wouldn't work.
    You said the values come from a query look up. So store the value into a variable.

    [CODE=java]String character = queryLookUP();//returns A, B or C [/CODE]
    Then set that variable
    [CODE=java]
    vcr3d.setAttrib ute("BusinessSe gment",characte r);
    [/CODE]

    Comment

    Working...