The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Setting values in Workflow Catalog task

Wade Clairmont
Tera Guru

I am attempting to create a workflow that will allow me to set some values in a workflow catalog task.   The example in the advanced field shows to qualify the field name with task ( task.approval = 'Approved').

 

My issue is, this doesn't work.   I have tried every way to get the values to set, and found one that partially works:

task.approval.setValue('Approved');                                                 which finally sets Approval to approved.

task.assignment_group.setValue("Service Desk');   doesn't work.   My assumption is that these values are not stored together on the same table, or else it would work,                                                                                                                                                                                   right?

 

Any ideas on how to set assignment group in workflow advanced script?

 

Thanks in advance.

11 REPLIES 11

Wade Clairmont
Tera Guru

Woops, here is a screen shot.set values in workflow catalogue task.png


shill
Mega Sage

Since you are setting a reference field with assignment group, you would need to set to the sys id of the group.


I normally use


task.assignment_group = '<sys_id of group>' ;   // name of group for ease of reading script


If the group never changes for this task, you could also just use the fulfillment group field on the activity instead.


Yeh,   I have tried to fulfillment group on the activity, and your suggestion using sys_id, however, no luck.   It seems that the only way I can get an assignment group to set for any catalog item is to   assign one in the maintain items form using fulfillment group field.



However, this will not work when you have two separate directions in a workflow assigning catalog tasks to separate assignment groups.



🙂


Hi Wade,



You should definitely be able to set the assignment group on the task with Steve's method. If you want to use the sysid you can go with Steve's method or if you want to use the display value of the group you can use:



task.assignment_group.setDisplayValue('Group Name');



If neither of those work, could you validate that the group sysid/name is correct and then post the code you used?