Hi All,
I have a requirement:
I have a rule input(cdt) ri!details with two field Id,Name. Now i have a local variable array type local!name:{"A","B","C"},
Now i want to save this local!name values into ri!details.Name on button click, like the below :
ri!details.Name:A
ri!details.Name:B
ri!details.Name:C
If i save it like a!save(ri!details.Name,local!name) , it only save the first Name A in all three place.
Thanks in advance.
Discussion posts and replies are publicly visible
is ri!details an array? And if not, is the "Name" field in the CDT an array?
Hi - assuming your rule input ri!details is an array, then something like this meets your needs:
a!buttonWidget( label: "Set Names", saveInto: { a!forEach( items: local!name, expression: a!save( ri!details[fv!index].Name, fv!item ) ) } )