how to save array of values in CDT in process model

Certified Associate Developer

For example, I have process variables arrays

        name : {"a","b","c","d"},

        age : {1,2,3,4},

        email : {"@e","@r","@t","@w"}

and I have a CDT which has {name,age,email} 
How can I save those array values in my CDT  in process model? bcz when I try to use script task to save the array values in CDT and write in the db using cdt  then only first row is getting written in db.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to tanujd6440

    you are writing the data (param3) right? were you able to store multiple data in it ? from your process instance photo it shows only one set of data(first values).

    if thats the case then - 
    check if you variable param3 can have multiple values

    and try storing the data into the variable like this 

    a!localVariables(
      local!name:{1,2,3,4},
      local!age:{"10","20","30","40"},
      local!param3:  a!forEach(
        items:local!name,
        expression:'type!{urn:com:appian:types:CP}CP_uiDataBase'(
          test_int: local!name[fv!index],
          test_text: local!age[fv!index],
          test_date: null
        ) 
      ),
      local!param3
    )

Children