PnP-Provisioning-Schema icon indicating copy to clipboard operation
PnP-Provisioning-Schema copied to clipboard

Failure to define Taxonomy Column source termsetID

Open holylander opened this issue 5 years ago • 0 comments

Hi there!, I was just realized that the following pnp-provisioning site template (.xml) setting doesnt work- I was trying to set the source termsetId that a taxonomy metadata colunm will use for showing the terms available in such column.

My site template .xml looks like this:

[...]
<Field Type="TaxonomyFieldTypeMulti" DisplayName="Topics" List="{{listid:TaxonomyHiddenList}}" WebId="{siteid}" ShowField="Term1033" Required="FALSE" EnforceUniqueValues="FALSE" Group="Custom Columns" ID="{bcf6564c-3bf6-4b59-8722-f14494f25d82}" SourceID="{{siteid}}" StaticName="Topics" Name="Topics" AllowDeletion="TRUE" Mult="TRUE" Sortable="FALSE">
          <Default>
          </Default>
          <Customization>
            <ArrayOfProperty>
              <Property>
                <Name>SspId</Name>
                <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{sitecollectiontermstoreid}</Value>
              </Property>
              <Property>
                <Name>GroupId</Name>
              </Property>
              <Property>
                <Name>TermSetId</Name>
                <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{termsetid:Mytermset:Myterm}</Value>
              </Property>
              <Property>
                <Name>AnchorId</Name>
                <Value xmlns:q3="http://www.w3.org/2001/XMLSchema" p4:type="q3:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">00000000-0000-0000-0000-000000000000</Value>
              </Property>
              <Property>
                <Name>UserCreated</Name>
                <Value xmlns:q4="http://www.w3.org/2001/XMLSchema" p4:type="q4:boolean"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
              </Property>
              <Property>
                <Name>Open</Name>
                <Value xmlns:q5="http://www.w3.org/2001/XMLSchema" p4:type="q5:boolean"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
              </Property>
              <Property>
                <Name>TextField</Name>
                <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{e5ee96e4-3e5d-4921-a7d7-ca32f8246bed}</Value>
              </Property>
              <Property>
                <Name>IsPathRendered</Name>
                <Value xmlns:q7="http://www.w3.org/2001/XMLSchema" p4:type="q7:boolean"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
              </Property>
              <Property>
                <Name>IsKeyword</Name>
                <Value xmlns:q8="http://www.w3.org/2001/XMLSchema" p4:type="q8:boolean"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
              </Property>
              <Property>
                <Name>TargetTemplate</Name>
              </Property>
              <Property>
                <Name>CreateValuesInEditForm</Name>
                <Value xmlns:q9="http://www.w3.org/2001/XMLSchema" p4:type="q9:boolean"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
              </Property>
              <Property>
                <Name>FilterAssemblyStrongName</Name>
                <Value xmlns:q10="http://www.w3.org/2001/XMLSchema" p4:type="q10:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Microsoft.SharePoint.Taxonomy, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Value>
              </Property>
              <Property>
                <Name>FilterClassName</Name>
                <Value xmlns:q11="http://www.w3.org/2001/XMLSchema" p4:type="q11:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Microsoft.SharePoint.Taxonomy.TaxonomyField</Value>
              </Property>
              <Property>
                <Name>FilterMethodName</Name>
                <Value xmlns:q12="http://www.w3.org/2001/XMLSchema" p4:type="q12:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">GetFilteringHtml</Value>
              </Property>
              <Property>
                <Name>FilterJavascriptProperty</Name>
                <Value xmlns:q13="http://www.w3.org/2001/XMLSchema" p4:type="q13:string"
                  xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">FilteringJavascript</Value>
              </Property>
            </ArrayOfProperty>
          </Customization>
        </Field>
[...]

When trying to update the termsetId part:

<Property>
    <Name>TermSetId</Name>
    <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{termsetid:Mytermset:Myterm}</Value>
</Property>

No matter what value I use, doesnt matter if it is a hardcoded termsetid like b1ee96e4-3e5d-4921-a7d7-ca43f8246cea, or a dynamic termsetId using tokens, as {termsetid:Mytermset:Myterm}, the column configuration is NEVER updated, not at list level, neither at site level.

I'm using the latest version of pnp-powershell 3.18.20...

I have managed to update the source termsetId that was setup for the metadata column updatin the sitecolumn schemaXml using CSOM

holylander avatar Feb 10 '20 14:02 holylander