在第一个阶段中,条件中所使用的数据必须更改,以便使步骤数目有限。此条件就是使各个部分的处理结束而不是继续循环。在下面示例的第 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
""
}