6

I am using the SharePoint Copy web service to upload a file to a document library. The library is using a content type that contains a managed metadata field. I can not figure out how to update this field by using the FieldInformation class. I have not had any issues setting any of the other fields using this method. An example of how I am uploading the file with the FileInformation can be found here

I have tried to set the field via its Display Name as well as the "hidden" note field with the same name plus 0.

SharePointCopyWebService.FieldInformation fieldInfo = new SharePointCopyWebService.FieldInformation();
fieldInfo.DisplayName = "Internal Audit Topics_0";
fieldInfo.Type = SharePointCopyWebService.FieldType.Note;
fieldInfo.Value = "Known Term";
fieldInfoArray.Add(fieldInfo);

Additional Info:

  • This is running inside a Win Forms application
  • I am not allowed to use the SharePoint Server/Client Object Models

Any ideas on how to update the managed metadata field with the FieldInformation class?

Community
  • 1
  • 1
TalonMcShay
  • 316
  • 3
  • 9
  • Were you able to solve this issue? I have come across a similar issue and I believe it has to do with spaces in the name of the metadata field. I can update a column if it contains zero spaces in the name only. [Here is my similar question](http://sharepoint.stackexchange.com/questions/84054/how-do-you-update-a-taxonomy-metadata-field-where-the-fields-name-contains-a-spa) – monkeyjumps Dec 03 '13 at 06:11

1 Answers1

0

The managed metadata field has a format similar to the lookup field (i.e. "id;#value") except it requires the guid of the term label e.g. "id;#TermLabel|xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

This will work, but forcing external applications to know the correct value of the guids pretty much ruins this feature for updating from external systems.

Nat
  • 14,175
  • 5
  • 41
  • 64