local variable

Certified Associate Developer

hi, 

I have a local variable "array of object" ,

I need to update value "seenBy" for one field in all array objects,

 a!flatten(a!forEach(
            items:  local!msg,
            expression: {
                a!save(fv!item.id,fv!item.id),
                a!save(fv!item.isDeleted,fv!item.isDeleted),
                a!save(fv!item.createdBy,fv!item.createdBy),
                a!save(fv!item.messageText,fv!item.messageText),
                a!save(fv!item.convId,fv!item.convId),
                a!save(fv!item.createdOn,fv!item.createdOn),
                a!save(fv!item.seenby,concat(fv!item.seenBy, concat(tostring(loggedInUser()) , ",") ),
                ),

            }
          )

          ),
a!startProcess(
  processModel: cons!COM_Write_AllMsg_SeenBy,
  processParameters: {
    allmsg: ri!allmsg,
    
  }
),

but the issue is :- 

"An error occurred while trying to write to the data store [chatDS]. No values have been written. Details: Could not execute JDBC batch update (APNX-1-4208-004)"

I think its because the expression send empty object to the process model:-

" [id=, convId=, messageText=, createdOn=, createdBy=, isDeleted=, seenBy=]   ",

 I need something to send the same array of object with same data  and just update in "seenBy" field

  Discussion posts and replies are publicly visible