Sitecore Rocks,将值从一个字段复制到另一个字段

Sitecore Rocks, copy value from one field to another

我有以下 Sitecore Rocks 查询。我想让 Background Static Image 字段的值与 Background Image 字段的值匹配。

update set @#Background Static Image# = @#Background Image# from /sitecore/content/Sites/MySite/Assets/Global/#Hero Items#//*[@@templatename = 'Hero'];

当我 运行 更新时它说(131 项受影响。)。但是,背景静态图像 字段永远不会更新。

这似乎是基于 http://vsplugins.sitecore.net/Sitecore-Query-Update-Samples.ashx

的正确语法

我想通了。为了让它工作,我必须在值前加上一个空字符串(两个单引号和一个加号)。

update set @#Background Static Image# = '' + @#Background Image# from /sitecore/content/Sites/MySite/Assets/Global/#Hero Items#//*[@@templatename = 'Hero'];