I'm uploading a stack of documents via a feature, and I have to set a Taxonomy Field. All the files are uploaded and all the other field values are correctly set. With the exception of the taxonomy field. So far the following does nothing

<Property Name="TaxonomyFld" Value="-1;#MyValue|{GUID}" />
<Property Name="TaxonomyFldHTField" Value="MyValue|{GUID}" />

nor did:

<Property Name="TaxonomyFld">-1;#MyValue|{GUID}</Property>
<Property Name="TaxonomyFldHTField">MyValue|{GUID}"</Property>

It's a single value field. So is it actually possible to set the value of a taxonomy field inside a Module-File-Property element? If so what is the correct format?

  • If you have those documents already uploaded to some document library. I suggest you to save the site as template if it is a publishing site, goto sharepoint designer and enable savesiteastemplate option in the site options section on the ribbon). Import the site into visual studio and you will have all the declarative mark up which is all you wanted.
    – Naveen
    Jun 7 '15 at 17:04
  • That only gives me the markup for existing items. It doesn't give me the markup to actually add a taxonomy item using a Module with File->Property
    – Paul
    Jun 7 '15 at 18:25


This is the code snippet you may be looking for

<File Url="SharePoint-2013.pdf" Type="GhostableInLibrary" Level="Published" Path="SharePoint-2013.pdf">
            <Property Name="ContentTypeId" Value="0x01010A00762D39FADE144DBBA15F7D59F9D4E83A00AE6A1E5FEEB3984E8CBDFA328116731B" />
            <Property Name="FileLeafRef" Value="101-New-Features-in-SharePoint-2013.pdf" />
            <Property Name="Title" Value="ddsad" />
            <Property Name="FormNumber" Value="dsad" />
            <Property Name="EffectiveDate" Value="2015-06-08T07:00:00Z" />
            <Property Name="FormCategoriesText" Value="Acc Fix Ben|1d94fa35-c388-4c94-a799-6c1be59ac10b" />
            <Property Name="TaxCatchAll" Value="" />
            <Property Name="FormCoverageType" Value="Medical" />
            <Property Name="FormGroupType" Value="L G" />
            <Property Name="FormCarrierText" Value="Aet|4a708f05-e7af-4033-adc7-bd73a3e65ed0" />
            <Property Name="Archive" Value="No" />
            <Property Name="AttachDisclaimer" Value="No" />
            <Property Name="ID" Value="1" />
            <Property Name="ContentType" Value="ExternalCarrier" />
            <Property Name="_ModerationStatus" Value="0" />
            <Property Name="FileDirRef" Value="forms/Lists/CarrierForms" />
            <Property Name="FSObjType" Value="0" />
            <Property Name="Order" Value="100.000000000000" />

look for "FormCategoriesText" and "FormCarrierText" which are the Note fields of the Taxonomy Field.

Let me know if you have any questions

  • Thanks for the example, but I'm still get the same result, all the other fields are populated correctly, just not the taxonomy field. I'm assuming this is a sample that worked for you. So I'll investigate the column and the library itself, and see if anything else is amiss in the config of the column
    – Paul
    Jun 11 '15 at 13:41

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.