Filling in a multi-choice field in a Sharepoint Doc-Lib using SetDocsMetaInfo Frontpage Server Extentions RPC method
I've been given a big chunk of code which eventually calls upon the SetDocsMetaInfo method from Frontpage Server Extension RPC. This is easy enough for most document uploading and property updating, except when dealing with multichoice fields. I've been scouring through MSDN and I can't find anything on how to fill in multiple values for such a field.
The general syntax for properties is something like this: [SR|default], with the type (st开发者_开发知识库ring in this case) followed by a pipe and then the value to be written. Does anyone know the syntax for multichoice fields?
references: MSDN: SetDocsMetaInfo
Did you try separating values with ;# like this: ;#Choice 1;#Choice 2;#
In webservices (Lists.UpdateListItems) that does the trick, perhaps that works in RPC too.
Setting it up like Eric suggested works!!!!
Here is how I setup my hashtable that I use to store my metadata
Dictionary<string, object> properties = new Dictionary<string, object>();
properties.Add("Title", "Test Title");
properties.Add("PermitApplicationID", 12);
//this next line is a metadata field that is a "choice type" field in sharepoint
properties.Add("DocumentCategories", ";#SP;#FP;#EC;#");
精彩评论