copy list collector Values to multiline text
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 03:58 AM
I have a variable of list collector type referring to user table. I need to copy the user names of that variable to another multiline text variable.
2 REPLIES 2

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 04:09 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 04:15 AM - edited 02-28-2024 04:16 AM
Hi @Ak8977,
I've written this code assuming you want it on server side, change the syntax accordingly if you want it on client side.
For Client side use GlideAjax to get the username. But the logic remains the same for getting the username.
Try this code -
var list = current.fieldName// your list collector field name
var arr = list.split(',');
var str = '';
for(var i = 0; i < arr.length;i++) {
var user = new GlideRecord('sys_user');
if(user.get(arr[i])) {
str = str + user.name + " ";
}
}
current.multilineFieldName = str; // your multiline text field name