I have the following code to set the column default values for a library:-

var corpTypetaxValue = listItem["CorpType"] as TaxonomyFieldValueCollection;
var corpTypeFieldValueArray = corpTypetaxValue.Select(taxonomyFieldValue => $"1033;#{taxonomyFieldValue.Label}|{taxonomyFieldValue.TermGuid}");
var ttt = String.Join(";", corpTypeFieldValueArray);  
bb.SetFieldDefault(context.Web.GetFolderByServerRelativeUrl(webrelativeurl + "/" + i2["TemplateListUrl"].ToString()+ "/"+mainfoldername.ToString()), "CorpType", String.Join(";", corpTypeFieldValueArray)); 

the above code will work well if the CorpType contain single term, but if it contain multiple terms I will get this error when I try to modify the column defaults from the UI:

The given value for a taxonomy field was not formatted in the required ;#| format.

  • How you are adding multiple terms? Can you share the code you are using for that? Feb 20, 2020 at 11:34

1 Answer 1


To include multiple taxonomy values, the values should be separated by ;#.




Update Managed Metadata column Default Value(s) using CSOM - C#

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.