How to Create Catalog Tasks based on List Collector Values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 10:57 PM
Hello,
For Example - The list collector contains 2 values, is it possible to use Business Rules or Flow Designer to create 2 catalog tasks under the same RITM number?
Thank you in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 11:29 PM
Hi @Radhika11 ,
Please refer to thread: https://www.servicenow.com/community/developer-forum/based-on-list-collector-values-create-catalog-t...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 09:28 AM
Good morning @Community Alums
Thank you for providing me with the thread. The thread was very helpful.
Here is the codes I modified it to fits our need:
(function executeRule(current, previous /*null when async*/ ) {
var options = current.variables.test_select_software.getDisplayValue().split(',');
for (i = 0; i < options.length; i++) {
var sct = new GlideRecord('sc_task');
sct.initialize();
sct.short_description = 'Software Name: ' + i;
sct.assignment_group = current.assignment_group;
sct.request_item = current.sys_id;
sct.insert();
}
})(current, previous);
Here are the tasks it created. However it is displaying numbers. Could it displays the "Name" value in the list collector instead?