我是sharepoint的新手,我正在尝试编写一个Web服务来将我们的sharepoint库存数据作为xml返回.除了其中一个列表包含查找字段并且生成的xml包含"Microsoft.SharePoint.Client.FieldLookupValue"而不是查找字段的预期字符串值之外,它的工作正常.
这是我用来生成xml的代码:
resultList = remoteWeb.Lists.GetByTitle("Cam Devices");
context.Load(resultList);
context.ExecuteQuery();
//Now its time to reach list's items
items = resultList.GetItems(new CamlQuery());
context.Load(items);
context.ExecuteQuery();
foreach (ListItem item in items)
{
rootNode.AppendChild(doc.CreateElement("ID")).InnerText = "pcat:401824";
rootNode.AppendChild(doc.CreateElement("Category")).InnerText = "Cam Devices";
rootNode.AppendChild(doc.CreateElement("Kimlik")).InnerText = Convert.ToString(item["ID"]);
rootNode.AppendChild(doc.CreateElement("Isim")).InnerText = Convert.ToString(item["Location0"]) + " >> " + Convert.ToString(item["Brand"]) + " >> " + Convert.ToString(item["ID"]);
}
Run Code Online (Sandbox Code Playgroud)
item ["Location"]是查找字段,它有一个类型的值FieldLookupValue,如何将查找值作为字符串?
我正在使用translate.instant并进行像这样的字符串连接
var variable = this.$translate.instant('project.discount') + " % " + this.$translate.instant('project.applied_to') + " " +this.office;
Run Code Online (Sandbox Code Playgroud)
我怎样才能在一个 $translate.instant 中作为字符串插值而不是串联来做到这一点
谢谢,