
Announcements
Hi, need a code to provide multiple values to a Person or Group column in SharePoint via Power Automate.
as of now I'm able to add only one User in the APPROVER Column.
I need a code for Allow Multiple Values for a Person or Group Column dynamically.
Hi @Ahemed,
You could use the CreateFieldasXml method for this. In the SchemaXml you can use the Type UserMulti and set the Mult property to True.
Below is an example
Uri
_api/web/lists/getByTitle('@{variables('ListName')}')/fields/CreateFieldAsXml
Headers
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose;charset=utf-8"
}
Body
{"parameters":{"__metadata":{"type":"SP.XmlSchemaFieldCreationInformation"},"SchemaXml":"<Field DisplayName='Approver' Format='Dropdown' IsModern='TRUE' List='UserInfo' Mult='TRUE' Name='Approver' Title='Approver' Type='UserMulti' UserSelectionMode='0' UserSelectionScope='0'></Field>","Options":12}}