How to Create Catalog Tasks based on List Collector Values

Radhika11
Tera Contributor

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?

Radhika11_0-1690437227517.png

Thank you in advance

2 REPLIES 2

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?   

 

Radhika11_0-1690475007674.png