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

Yeah the syntax looks good. You might try printing the assignment group value to the log at the very end of the script to make sure that looks right. I would also look at any assignment rules or something outside of this script that may be affecting the assignment group field on the catalog task.


Wade Clairmont
Tera Guru

Submitted incident with ServiceNow, and received the following:


1) The issue is with the business rule "Assignment Group from Cat Item FG"


2) If you check the above business rules, this runs on Insert of the Catalog Task and changes the Assignment Group to the group from the Catalog Item


3) But at that point, the Assignment Group from the Catalog Item is blank because I wanted to specify from the workflow, so at that point the "Group" is blank, hence the Task is generated with a blank Assignment Group.



Work around (still testing)


Add IF statement in Business Rule to only post the Assignment Group if it is not blank.



Thank you all for you assistance.