HI all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 10:59 PM
when i am select List collector values , each value generated to sc task
how can i do this workflow
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 11:57 PM
Hi @basha shaik ,
You can use flow designer to achieve this
Please check
https://www.servicenow.com/community/servicenow-impact-forum/hi-all/td-p/2939281
Tested in PDI & working as expected. Please try
I started answering community questions recently. If my answer helped you in any way, please mark it as helpful or correct. It would be a great boost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 01:40 AM
Hi @basha shaik,
Please try this below code and edit it as per your requirement:
//var cert = current.common_name.getValue('sys_id'); // Request Item reference variable of certificate record
//var list = current.variables.u_business_service_list; // Request Item list collector of related business services
var cert = '9ad10b62dbd56f001bd3c170ba9619e1'; // Testing with certificate's sys_id
var list = [];
var list = 'App 1,App 2,App 3'; // Testing with strings
var array = list.split(',');
for (var i=0; i < array.length; i++) {
// M2M table, related list, certificate to business service
var bs = new GlideRecord('x_teth_ekcm_m2m_business_ser_certificates');
bs.setLimit(10);
bs.addQuery('business_service', '!=', array[i]);
bs.addQuery('certificate_common_name', '!=', cert);
bs.query();
if(bs) {
bs.initialize();
bs.business_service = array[i];
bs.certificate_common_name = cert;
bs.update();
}
}
Please accept my solution if it works for you.
Thanks
Jitendra