saving array into the field of an array cdt

I have a rule input of type cdt array. What I want to do is to add a list of values to one of the fields by looping through another list, something like in the example below.

a!save(
ri!test.user_name,
a!forEach(
items: {1,2},
expression: "hey"
)
),

the problem is that it adds all the values to all the rows in the cdt, so it looks like this

{{ user_name: hey;hey}, {user_name: hey;hey}}

I've done this many times and never had this issue before. What am I doing wrong?

doing save(ri!test.user_name, {"hey", "hey}) returns the same output. So I don't know what's happening.

Any ideas on doing this?

  Discussion posts and replies are publicly visible