How to update a single column value of multiple rows in an array with a particular value in process model?

Use Case : I will be uploading multiple documents for a single question - Document to questions (many to one relationship )

I have a CDT for Question and another CDT for documents.(Questions and documents are two different tables in database.) Since, I need to populate the document id in the document table based on the questionaries entry - For now, I am getting the primary key of question table first (after making an entry in the database)and then  trying to pass the value to document table for multiple rows.

I am making an entry in the Question table via the process model using write to data store entity smart service, then using a script task I get the ID (Primary Key) of the newly inserted Questions and save it against a new process variable. Then, there is another write to data store entity smart service and in the input node I have mapped the newly created Questions ID against the particular column. When there are multiple attachments, only the first row gets updated with newly created Question ID in the respective column and all other rows are updated with null value.

In short - Multiple value update is not working - Is there a way to update the newly created Questions ID against a particular column for all the rows present in array? Please elucidate.

  Discussion posts and replies are publicly visible