In the first stage, the data that is used in the condition must change so that there is a finite number of steps. This condition is what makes the processing of the sections end and not continue to loop. In step 5 of the example below, the condition is that the teamList variable is not empty. So the condition is true so long as there are data entries for the teamList variable. When there are no more data entries, the condition is false and the repetition ends.
To have the queries executed multiple times, add a dynamic Data Source Configuration element inside the loop container to force the queries to be initialized more than one time.
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
""
}