shareplum icon indicating copy to clipboard operation
shareplum copied to clipboard

Update Multiple Choice field value in list items

Open masha6 opened this issue 4 years ago • 2 comments

I do not manage to update multiple choice field value in list items. Is it possible?

masha6 avatar Jan 05 '21 12:01 masha6

I think it should be. Do a GetListItems on a List that has the multiple choice to determine the correct format for your data.

jasonrollins avatar Jan 29 '21 00:01 jasonrollins

Not sure, if this holds for every multiple choice type and Sharepoint version, but this worked for me (assuming choices [OptionA, OptionB, OptionC]:

my_data = {
    'MyNumericColumnName': 3.141,
    'MyMultipleChoiceColumnName': ';#OptionA;#OptionB;#;#OptionC;#'
}
sp_list.UpdateListItems(data=my_data, kind='New')

DavidBreuer avatar Sep 19 '21 15:09 DavidBreuer