PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 07/30/2020 10:28 AM by  Karen Sheridan
Array values from Rich Client
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Karen Sheridan
Private
Private
Veteran Member
(362 points)
Veteran Member
Posts:138


Send Message:

--
07/29/2020 3:53 PM

    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
    Private
    Private
    Veteran Member
    (1157 points)
    Veteran Member
    Posts:403


    Send Message:

    --
    07/29/2020 5:09 PM
    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
    Private
    Private
    Veteran Member
    (362 points)
    Veteran Member
    Posts:138


    Send Message:

    --
    07/30/2020 10:28 AM

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

     

    Karen

    You are not authorized to post a reply.