I am trying to copy the Keyword value to a Metadata field value using the SDL Tridion Core Service. I am able to run my console app successfully without any error but I don't see the Metadata field value getting copied.
Below is my code. Please advise.
KeywordData currentKeyword = (KeywordData)client.TryCheckOut(keywordUri, readOptions);
string translatedTitle = currentKeyword.Title;
if (currentKeyword.MetadataSchema.IdRef != "tcm:0-0-0")
{
SchemaFieldsData schemaFieldsData =
client.ReadSchemaFields(currentKeyword.MetadataSchema.IdRef, true, readOptions);
SingleLineTextFieldDefinitionData test = new SingleLineTextFieldDefinitionData();
test = (SingleLineTextFieldDefinitionData)schemaFieldsData.MetadataFields[0];
test.DefaultValue = translatedTitle;
currentKeyword = (KeywordData)client.Save(currentKeyword, readOptions);
}