I managed to handle this. In case someone has similar needs, here is the hint (just an excerpt from the script):
// common report handling functions ommited for brevity
var inputGroupId = input.InGroupId;
var groupReportName = "AccountsFeature.group.table_config";
var groupReportContext = util.createContext("global_admin", null, null);
var groupReport = getReportView(groupReportContext, groupReportName);
groupReport = groupReport.filterRowsByColumn("Group ID", inputGroupId, false);
if (groupReport.rowCount() != 1)
{
logger.addError("Group with ID [" + inputGroupId + "] not found!");
ctxt.setTaskStatusMessage("Group with ID [" + inputGroupId + "] not found!");
ctxt.setFailed("Group with ID [" + inputGroupId + "] not found!");
exit;
}
else
{
var groupName = groupReport.getColumnValue(0, "Group Name");
logger.addInfo("Group ID [" + inputGroupId + "] is [" + groupName + "]");
var userList = "";
var userReportName = "AccountsFeature.user.table_config";
var userReportContext = util.createContext("global_admin", null, null);
var userReport = getReportView(userReportContext, userReportName);
userReport = userReport.filterRowsByColumn("User Group", groupName, false);
logger.addDebug("*** Found users [" + userReport.rowCount() + "]");
for (i=0; i<userReport.rowCount(); i++)
{
var userName = userReport.getColumnValue(i, "Login Name");
logger.addDebug("*** Found user [" + userName + "]");
userList = userList + userName + ",";
}
// Remove last coma
userList = userList.substring(0, userList.length()-1);
output.OutUserList = userList;
}
Now, you can pass OutUserList to the Start Loop task for iteration.
Cheers,
Krzysztof