Service Catalog Tasks - How to set requested for off of Request

cfrazer
Giga Contributor

Hello,

I have a workflow set-up on the sc_request table for the ServiceNow catalog. It works perfectly. I want to populate the Requested For field in the SC task with the info from the Request.   I've tried a ton of different things but nothing is working...currently I have "task.requested_for = current.variables.requested_for". I have attached an image to show what I am talking about. Please let me know if you need any more information. Thank you.

Screenshot 2018-01-12 at 6.14.42 PM.png want Requested For to go into the Catalog task ->Screenshot 2018-01-12 at 6.12.08 PM.png

1 ACCEPTED SOLUTION

puneetgoels1
Tera Guru

try task.requested_for = current.request.requested_for



alternatively you can use glide record to pull data from request table and update sc_task table


View solution in original post

5 REPLIES 5

puneetgoels1
Tera Guru

try task.requested_for = current.request.requested_for



alternatively you can use glide record to pull data from request table and update sc_task table


Trying task.requested_for = current.request.requested_for results in the SC task not being generated at all...do you have any idea why?


I hope you are putting this script in advanced script text box. Something like in the screenshot below



find_real_file.png


Yes, that's where I put it. So I am trying to put the 'Requested For' field in the sc_request table into the 'Requested For' field for the sc_task table.


But when I put task.requested_for = current.request.requested_for in t the advanced script, it fails to generate the SC task at all.


I am stumped...