- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2014 06:41 AM
Hi @all,
is there an easy and fast way to get the content of a Variable Set Value from a Service Catalog Item inside a workflow?
Example:
The user adds PC stuff to his cart and a mandatory field need the information who has to approve his request. The user have to specifie an approver. And then I want to create an incident which is directly assigned to this entered user/approver...
How I can do this?
Thanks
Mike
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2014 07:08 AM
Hi Mike,
In any workflow, you can get the value of a variable by using the notation current.variables.<variablename>. In the case of a reference variable, you'll get the sys_id of the referenced record.
To take your specific example, you can add a Create Task activity to your workflow and use the Script field in that activity to assign the task to the user referenced in the variable like this:
task.assigned_to = current.variables.<variablename>;
Where <variablename> is the name you've assigned to the reference variable.
With all of that said, I'm not sure I understand why you'd want to create an incident for a user who needs to approve a service request item. Wouldn't it make more sense to just use an Approval - User activity and assign the person in the reference variable as the approver? Using an incident to record an approval doesn't make any sense to me. The system isn't set up to support this, the approver would need a process user role (like itil) in order to resolve the incident, and you'd need to link the Incident to the Requested Item record via the Parent field. All of that sounds like a lot of work to imperfectly recreate what ServiceNow already does much better with Approval records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2016 05:47 AM
Hey Ashish, as James mentioned you wouldn't typically create and assign an incident for approval. This will be managed nicely by the Approval - User activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 12:42 AM
Does anyone have an answer to this question?
Is it possible to define variable sets within a run script cube in a workflow?