While saving editable grid one record is saving remaining records is storing null

I have ProjectTeam  CDT for this i have created editable grid to submit list of records 

1.Interface configuration 

2.Procees start form configuration

3.variable configuration

4.debugging form submitting two records in editable grid

5.Process history 

6.after completing process only one record saving one record is null as shown in screeshot

7.ProjectTeam CDT

addRowlink: a!dynamicLink(
label: "Add Employee",
/*
* For your use case, set the value to a blank instance of your CDT using
* the type constructor, e.g. type!Employee(). Only specify the field
* if you want to give it a default value e.g. startDate: today()+1.
*/
value: {
'type!{urn:com:appian:types:DSR}DSR_ProjectTeam'()
}

,
saveInto: {
a!save( local!projectteam, append(local!projectteam, save!value)),
 a!save(ri!DSR_ProjectTeam, append(local!projectteam, save!value))
}
),

any suggestions on this Please let me know any changes required

Thanks

  Discussion posts and replies are publicly visible

Parents Reply
  • Technically you try to assign a single value to a list. The result is that the list only has one value ...

    We prefer to create an expression rule for these kinds of "complex" data manipulations. First rule input is your list of milestones, second one is the id of the project. Now you use the plugin updateDictionary to assign the id to the milestones in a foreach. Use this expression in a script task.

    The other option is to do that in process using MNI (Multiple Node Execution) but it is agreed consent to prefer an expression.

Children
  • a!localVariables(
      local!a: {
        {projectteamid:220, projectid:196, roleid:3, employeeid:1, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"},
        {projectteamid:221, projectid: 4  , roleid:7, employeeid:2, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"}
      },
    local!b:70,
    
    )

    Stefen Helze,

    from above code  can you send me solution  using updateDictionary  to update local!b value to the local!a dictionary .

    Thanks in advance 

  • a!localVariables(
      local!a: {
        {projectteamid:220, projectid:196, roleid:3, employeeid:1, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"},
        {projectteamid:221, projectid: 4  , roleid:7, employeeid:2, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"}
      },
      local!b:70,
      a!forEach(
        items: local!a,
        expression: updatedictionary(
          fv!item,
          {projectid: local!b}
        )
      )
    )