Update a SharePoint file field that has a selection type selection selection

I use the UpdateListItems method (Lists.asmx web service) to update the fields of a loaded document in a single SharePoint document library. In my case, I have a document library called Schedules. It has a field called “Day of the week,” which is a multiple choice of “Selection,” with valid values ​​from Monday through Sunday. Here is the query I found that should select Monday and Friday (and this doesn't work, obviously):

<Method ID='1' Cmd='Update'>
    <Field Name='ID'>1</Field>
    <Field Name='Day of the Week'>Monday#;Friday</Field>
</Method>

I read somewhere that inserting the string "#;" between elections it should be allowed. The end result is that the "Day of the week" field is updated with the line "Monday #; Friday", and when I want to edit the item, the selection is not made. On the other hand, if I just use Monday, it works. Now, how can I get it to update multiple selections? Thanks.

+3
source share
1 answer

I believe it should be ;#

A quick check shows how SharePoint stores multiple-choice fields, try:

; # monday; #Friday; #

With a separator at the beginning and at the end.

: , SharePoint ( ), - , .

+1

Source: https://habr.com/ru/post/1718269/


All Articles