I have a droplist field in Item. Its source is of a folder where 2 items present named Yes and No. When the droplist field is clicked 2 options comes up. I want to edit the field through Code i am doing below:


sampleItem.Fields["DroplIst Field Name"].Value = "Value to be saved in droplist";


It updates the field , But when I try saving the Item it throws error as "The field contains a value that is not in the selection list.". How can i select the item from selection list through Code?

| improve this question | | | | |

I think, your issue is similar to this article.


If you can use DropLink, instead of DropList, then it will update the value, as it maintains the ID of that target item.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.