迭代元素只在 V2 模板中提供。在第一个阶段中,条件中所使用的数据必须更改,以便使步骤数目有限。此条件就是使各个部分的处理结束而不是继续循环。在下面示例的第 5 步中,条件是 teamList 变量不为空。所以,只要有 teamList 变量的数据条目,该条件就为 true。当没有数据条目时,该条件为 false 并将结束重复。
要让查询执行多次,请在循环容器中添加动态数据源配置元素以强制初始化查询多次。
表元素添加至模板内容编辑器。
文本元素添加至单元格。
迭代元素,并将该元素放在表行之间。
容器元素。第一个容器用于计算列表中要用在当前行中的第一个名称。第二个容器用于结束循环以免不必要地继续。var pos = teamList.indexOf( ",");
if ( pos >=0)
{
// get the first member ( till the first comma)
teamList.substr( 0, pos);
}
else
{
// last member
teamList;
}
var pos = teamList.indexOf( ",");
if ( pos >=0 && pos < teamList.length)
{
// get the first author ( till the first comma)
teamList.substr( pos + 1);
}
else
{
// last member, remove it
""
}