How to get list collector values and populate in string field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 01:47 AM
Hi Team,
I have to get list collector values and populate in string field in other table how can i achieve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:45 AM
Hi Please find some example below:
var list = current.watch_list.getDisplayValue();
var array = list.split(",");
for (var i=0; i < array.length; i++) {
gs.print("Display value is: " + array[i]);
}
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:49 AM
hi prakash,
is this in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:55 AM
Hi
Current you can use in client script.Try using in business rule..
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:57 AM
Sorry.i mean to say current object u will not able to use in client script so try with Business rule.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 03:06 AM
Use before update BR and below BR can be little help :
-------------
var glist = current.u_select_locations_to_include.toString();
var arr = glist.split(",");
var str = "";
for(var i=0; i<arr.length; i++)
{
var gr = new GlideRecord("u_custom_workforce_report_request");
gr.query("sys_id",arr[i]);
gr.query();
if(gr.next())
{
if(str.indexOf(gr.field_name) == '-1')
{
str += gr.field_name; // field_name is what value you need from the table
}
}
}
current.string_field = str;
------------------------