cdt n for each loop issue

Hi,

 I am having a cdt structure like cdt A(id,yes,no) which i m using to add data using Add icon similar to grid add .Once when i enter the id it will display another section with cdt B structure(a,b,c,d) where a,b will be populated based upon the id automatically.For c and d we have to enter manually. once entered it will save into cdt structure B.

I m using for each loop with item as cdt A structure and passing CDT B as paramter.

the issue i m facing is when i m trying to add values to cdt b(2nd time by clicking add icon) ,it is updating the value to cdt b and cdt a instead of appending it.

Kindly provide any suggestions on how to save the value inside add save function,also how to pass the index of cdt B as parameter.

Sample code:

a!foreach(

items:local!cdt A(structure of cdt a)

expression: rule (cdt b)

a!imageField(
images: a!documentImage(
document: a!iconIndicator(icon: "ADD"),
link: a!dynamicLink(
value: 'type!cdta(),
saveInto: {a!save(local!cdt A, append(local!cdt A, save!value)),
a!save(ri!cdta,local!cdt A)
}
)
)

)

 

 

Thanks in Advance

PradeepB

 

  Discussion posts and replies are publicly visible