Workflow Script to create Tasks

Monique2
Kilo Expert

I am trying to create tasks based on selections from a list collector variable in a request item.

I have the following script that creates the tasks correctly but I am not able to set the description of the task with the value from the List collector variable.

find_real_file.png

Line 18 sets all the short description values the same.

 

find_real_file.png

The Assigned to value is correct (not displayed in the image).

I need to enter the name selected in the List collector in the short description field, to later create an approval on the task.

Any assistance is appreciated.

Thanks
Monique

1 ACCEPTED SOLUTION

Monique2
Kilo Expert

Hi Air,

Thanks for following  up.

I solved the issue by commenting out lines 9 -`12.

Thanks

View solution in original post

5 REPLIES 5

AirSquire
Tera Guru

Have you tried logging, answer[i].nm?

Regards
Air

Hi Air,

I have added logs on line 10, 15 and 25.

The values are correct on line 10 but not 15 or 25.

Thanks
Monique

Hi Monique,

Can you update the while for pushing values in answer array with below script

while(gr.next()){
var jsonobj = {};
jsonobj["nm"]= areas.name.toString();
jsonobj["cont"]= areas.contact.toString();

answer.push(jsonobj);
}

Regards
Air

Hi Monique,

Did that work?

Regards
Air