Store a string array in a array pv variable in the process model in the correct format

Hi,

I have a rule which returns an array of strings in this format:

List of Text String: 4 items (The number of values can differ depending on the number of values present in the database for a particular request)

"60,70"

"60,70,72,74"

"72"

"70,72,74"

When i use the same rule in the process model to store in a pv(process variable) having multiple checked then i expect the following value for the pv:

60,70, 60,70,72,74, 72, 70,72,74

Instead i get the value which considers each value as a different input to an array. Like this:

60, 70, 60, 70, 72, 74, 72, 70, 72, 74

Can anybody help me out with this?

  Discussion posts and replies are publicly visible

Parents
  • Hi Mohit,
    please try this one give you the list of the text string as you expected,
    code:
    touniformstring(
    trim(
    {
    "60,70",
    " 60,70,72,74",
    "72",
    "70,72,74"
    }
    )
    ),

    output: List of Text String: 4 items
    "60,70"
    "60,70,72,74"
    "72"
    "70,72,74"
    make sure that saving parameter of PV(process variable also Text array, you might have using the integer array, please check the input types also).

    hope this helps for you !
Reply
  • Hi Mohit,
    please try this one give you the list of the text string as you expected,
    code:
    touniformstring(
    trim(
    {
    "60,70",
    " 60,70,72,74",
    "72",
    "70,72,74"
    }
    )
    ),

    output: List of Text String: 4 items
    "60,70"
    "60,70,72,74"
    "72"
    "70,72,74"
    make sure that saving parameter of PV(process variable also Text array, you might have using the integer array, please check the input types also).

    hope this helps for you !
Children
No Data