Ankur Bawiskar
Tera Patron

@Manohararuna 

so email addresses of those users should be populated where?

Example: I am taking description field for my reference, you can use this advanced script in Create Catalog Task Activity

var myArray = current.variables.listCollectoVariableName.toString().split(','); // give your variable name here

var emailArray = [];

for (var i = 0; i < myArray.length; i++) {
    //myArray[i];
    var gr = new GlideRecord("sys_user");
    gr.addQuery("sys_id", myArray[i]);
    gr.query();
    if (gr.next()) {
        emailArray.push(gr.getValue('email'));
    }
}

task.description = 'Email addresses are ' + emailArray.toString();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post