365 Sharepoint List Update List Item

How to update a List Item field with more than one person data? I am able to update one person data with LookupId like this:

Get List Info
v
For Each List Item
v
in assign >> item.Fields[index].Value=“123”
v
Update List Item >> item

Problem is, I need to add more than one persons data. I tried different kind of arrays (object, int, string) - and with using LookupId, Email or Name. Nothing has succeeded so far. Any help..? I am developing in C#.

@ext-o
at the place of index, for each iteration it should increase by one
and value which is you are updating use variable and pass that variable based on person

Hi @ext-o

Try this,

Retrieve the list items using SharePoint Get List Items, then within a For Each loop, assign the field using a collection of LookupIds like this: item.Fields("AssignedTo") = New List(Of Object) From {LookupId1, LookupId2, LookupId3}. Finally, use the SharePoint Update List Item activity to save the changes. Ensure the SharePoint field is set to accept multiple people.

Assigning like this is not possible >> item.Fields[“AssignedTo”]

Instead this should be possible >> item.Fields[“AssignedTo”].Value
in Value to save -field I tried this..

new List {123,169}
and this..
new List {“123”,“169”}

And then Update List Item >> item

This did not work.

Column settings is this:

Pls check below link might be helpful:

The index has been defined earlier in the code, its dynamic and correct. As well as the value..

When I switch Column setting “Allow multiple selections:” from Yes to No, I am able to add one person data again (with lookupId or email..) with a dynamic string variable. If that setting is Yes, I am still not able to add any. I have tried now with list or array (of object, string or int) and with lookupIds, emails, names.. No success so far.

check any other permissions are required from your end.
and also try another method as well, in your workflow inside of loop use sharepoint activities along with parent and also verify after completing one iteration the person is added or not or any time is taking to add that.