Array values from Rich Client

 2 Replies
 1 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Karen Sheridan
Veteran Member
Posts: 141
Veteran Member

    I need to pass a list of employee status codes into the flow and put them in a simple array.

    From the log:

    FromStatusCodes = A1,A2,A3,A4,A5,A6,A7,A9,MD,ML,RW,WC - this list was hard coded in the start node of the flow ["A1","A2","A3","A4","A5","A6","A7","A9","MD","ML","RW","WC"] - field is defined as array

      testInt1 = A2 - from FromStatusCodes[1];

    ToStatusCodes = ["A8","SV"] - this list is coming from rich client - field is defined as string
    testArray = [Ljava.lang.Object;@78d48440 - field is defined as array and the value is ToStatusCodes
    testInt2 = undefined - from testArray[2];

    It appears that it isn't possible to take a string value from rich client configuration and convert it to an array.  Is that correct?

    Thanks!

    Ragu Raghavan
    Veteran Member
    Posts: 475
    Veteran Member
      Does your config variable have the [ and ] characters? This is how I would do it:
      Config variable = A8,SV (without the square brackets and double quotes, saves me the trouble of stripping them off later, unless you do need them)

      ToStatusCode = config_variable, which will set it to A8,SV
      testArray = ToStatusCode.split(",");
      testInt2 = testArray[1];
      Karen Sheridan
      Veteran Member
      Posts: 141
      Veteran Member

        Thank you Ragu.  I made those changes and it worked perfectly!

         

        Karen