4

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 (string 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

notnot
  • 4,472
  • 12
  • 46
  • 57
  • Found another reference out there - http://rob-dev.blogspot.com/2005/07/fprpc-mystery-solved.html Trying "\;#" as a delimiter doesn't cause an error, as ";#" does, but also leaves the metadata field empty. Maybe this could give someone out there an idea. – notnot Jul 18 '10 at 00:31

2 Answers2

3

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.

ErikE
  • 857
  • 8
  • 18
  • with the ;# before and after the list as a whole? – notnot Jul 16 '10 at 18:24
  • 1
    Yes, and as separators between the elements. – ErikE Jul 16 '10 at 18:51
  • Doesn't work, I just keep getting the same "The underlying connection was closed: The connection was closed unexpectedly" error. I don't think I can use semicolons, since those are the delimiters between different metadata elements. – notnot Jul 17 '10 at 23:07
  • 1
    I don't have a FPPRC test project so I can't easily try it for you, but what I'd do is look with Fiddler (http://www.fiddler2.com) to see what data is going accross. If you're in C/C++/C#, make sure the \ itself is escaped in your code (\\\). – ErikE Jul 19 '10 at 20:04
  • Thanks for this. I was having the same problem and could not find documentation ANYWHERE on it. The delimiter formatting and escaping the semi colon made this work for me. – Dan G Sep 16 '16 at 15:15
1

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;#");
jalsql
  • 11
  • 2