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}");
context.ExecuteQuery();
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.