Add picker Value to content of a text field within the component

I have a simple card to populate for several students so the teacher can write/save grades and comments. In order to facilitate things, I have a picker that shows some suggestions to add to the comments field. I would like to have it so the user (teacher) can select a value from the picker and that value would go to the commentsField. If the teacher wants to edit the field adding or removing something, he could do it manually, or even select a second value from the picker which would be added.

A “normal” approach within React Studio is to use a dataslot and take the data source in the comments field from that dataslot but… As there are a lot of cards in the same screen (one for each student) the comments field on each card would show the value that is being written for one student. I did a workaround saving the “active” studentID into a dataSlot but it seems quite complicated the solution that I applied using like 3 or 4 dataslots just to have a comments field where you can add text writing it or selecting it from a picker.

So my question is if I can just create an script in the interaction of the picker to add the value to the existing content in the commentsField. I tried this:

But the console.log for the input says it is undefined. How could I do it?

I think you can do this by letting each row in a datasheet represent a card. Each field can be a column. I think you just need 1 dataslot to track the card being edited.