开发者

Sharepoint: How to get value of the column?

开发者 https://www.devze.com 2023-01-08 17:25 出处:网络
I have list in Sharepoint with new column \"First line approvers\". Type of this column is \"Person or Group\" and \"Allow multiple selections\" is set to \"Yes\".

I have list in Sharepoint with new column "First line approvers". Type of this column is "Person or Group" and "Allow multiple selections" is set to "Yes".

How can I get an开发者_如何学Cd modify values of this column in runtime(from workflow) ?


Assuming you've bound WorkflowProperties to the class..

SPFieldUserValueCollection f= new SPFieldUserValueCollection(WorkflowProperties.Web,WorkflowProperties.ListItem["First line approvers"] + "");

Then you can iterate over the collection / modify the collection and save your changes back by:

WorkflowProperties.ListItem["First line approvers"] = f.ToString(); //You might not need the to string here, I can't remember. 
0

精彩评论

暂无评论...
验证码 换一张
取 消