- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 03:13 AM
Hi Community,
I'm wanting to add a new field to the Catalog Task Workflow Activity and for the value to be carried through to the Catalog Task itself, as per the behaviour of the Fulfilment Group, Assigned To and Short Description fields.
I know how to add the fields to the task table and the Workflow Activity Definition but I'm struggling with how to get the value to be set when the task is created.
I can fall back to using "Task Value from Values" rather than "Task Value from Fields" if I absolutely have to but this wouldn't be ideal as the new field is going to need setting on almost every Catalogue Task our Workflows generate, so it would be useful to have its own field in the Workflow Activity to serve as a reminder that it needs to be set for anybody creating Workflows in the future.
Regards,
Kyle
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2017 01:41 AM
I've managed to find the answer after digging around some more.
The Catalog Task Workflow Activity Defintion (where I put my new field to make it appear on the Workflow Activity) doesn't actually set the values from the fields, it invokes the Create Task Activity Definition first.
Once I was looking at the Create Task script it was pretty obvious how the fields were being set and I just needed to add a new line as per the following:
_setValuesFromFields: function(task) {
task.assignment_group = activity.vars.task_fulfillment_group;
task.assigned_to = activity.vars.task_assigned_to;
task.short_description = activity.vars.task_short_description;
task.description = activity.vars.task_instructions;
task.my_new_field = activity.vars.my_new_wf_field
},
Happy days.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 12:06 PM
Do you want to create a new Field in Catalog task table or add Variables in Catalog task From ?
In workflow run script activity , You can defined a workflow scratchpad variable which is global variable type for workflow and can use in any other workflow activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 11:44 PM
Hi,
I want to create a new field to the Catalogue Task table.
In the same way that the Fulfilment Group is carried from the Workflow Activity Form to the Assignment Group field on the Task table, I want the value of a new field on the Workflow Activity to be carried through to a corresponding field on the Catalogue Task table.
Regards,
Kyle

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 11:49 PM
You can add script in workflow task activity to update the field value.
task.field_name = current.variables.variable_name;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 11:52 PM
Thank you, but as I explained, I would like this to work using whatever mechanism currently sets the Fulfilment Group, Assigned To and Short Description when setting 'Task Value from Fields' rather than scripting it as it is to be used in almost every workflow we have.