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:01 AM
Use this:
var list = your_field_name_here.toString();
var array = list.split(',');
for (var i=0; i < array.length; i++) {
gs.log("Reference value is: " + array[i]);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:02 AM
hi david,
I have to show the selected values in my custom table from record producer where do i need to write script for this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:08 AM
That script will take the sys-id's in a glide_list field and add them to an array, then you can do with them whatever you want, add your code within the for section
for (var i=0; i < array.length; i++) {
gs.log("Reference value is: " + array[i]);
//add your code here
}
If you want to get the display value simply change the first line as below:
var list = your_field_name_here.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 02:11 AM
better approach.