correct syntax saving to a multivalue CDT

I know this is due to not enough coffee, but here goes.

I've a simple interface A. I have a CDT defined as an Array type. At runtime, the CDT is populated with data. (cdt[1]).

On click of a button, i wish to save a new set of values to cdt[2] or 3 or whatever.

 

I tried using

saveInto{ target cdt, value@ append(cdt, cdt.field1) but no luck.

What am I missing chaps ?

 

 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    If you are still looking for a solution.
    I had similar issue the way i used to overcome is as follows. May not be recommended when data set is really huge.
    a!foreach(
    items: ri!cdt.field,
    expression:
    a!save(ri!cdt[fv!index].field,
    {index(ri!multipleListVariable,fv!index,0)}
    )
    )
    PS: the target CDT and multipleListVariable should of same length. Most probably this should be the case.
Reply
  • 0
    Certified Lead Developer
    If you are still looking for a solution.
    I had similar issue the way i used to overcome is as follows. May not be recommended when data set is really huge.
    a!foreach(
    items: ri!cdt.field,
    expression:
    a!save(ri!cdt[fv!index].field,
    {index(ri!multipleListVariable,fv!index,0)}
    )
    )
    PS: the target CDT and multipleListVariable should of same length. Most probably this should be the case.
Children
No Data