How to convert 3;4;5 into {3,4,5}

I am saving multiple dropdown values like 3;4;5 and if I am passing the same value into an expression rule and doing for each it isn't taking individual value instead consider as 345.

How to convert 3;4;5 into {3,4,5}

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    HI

    Please find the code below. By passing the selected dropdown value into an expression rule and iterating through it using a foreach loop, it will become the 'items' for further processing.

    a!localVariables(
    /*The below localVariable will hold selected drop down values*/
      local!dropDownValues: tostring({ 3, 4, 5 }),
      if(
        a!isNullOrEmpty(local!dropDownValues),
        "",
        split(local!dropDownValues, "; ") /*By using split function the data will be displayed as a list*/
      )
    )

Reply
  • 0
    Certified Associate Developer

    HI

    Please find the code below. By passing the selected dropdown value into an expression rule and iterating through it using a foreach loop, it will become the 'items' for further processing.

    a!localVariables(
    /*The below localVariable will hold selected drop down values*/
      local!dropDownValues: tostring({ 3, 4, 5 }),
      if(
        a!isNullOrEmpty(local!dropDownValues),
        "",
        split(local!dropDownValues, "; ") /*By using split function the data will be displayed as a list*/
      )
    )

Children