Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Requested Item - How do I reference info from item in to task

Greybed
Kilo Explorer

Hi,

I need information to be pulled from a Requested Item in to a Catalog task to populate in Short Description. The fields I need the information to be pulled from are ${location.company.name} and ${cat_item.name}, when I have tested them they are not bringing up any of the information.

I have attached a screenshot of what it looks like, need it to pull info from user record for location and the type of item that has been requested from the catalog item.

Hope this makes sense.

Any help is greatly appreciated.

Thank you

11 REPLIES 11

Jim Coyne
Kilo Patron

I'm assuming you are creating the task through a workflow Catalog Task activity, so you should be using:



task.short_description = current.location.company.name + " " + current.cat_item.name

in the "Advanced script" field and not in the "Short description" field. I usually just put "set below" in the Short description field because it is a mandatory field.


Greybed
Kilo Explorer

Thanks Jim but I need the info to be showing in the Short Description field as it is for a 2nd Line team who need to see what is required at first glance.

Some of the forms are an order guide but some are individual items therefore there could be a number of items on one request so handy if they can see exactly what is being requested so relevant person can deal with it.

Thank you


I understand, and that script will create the Short description field as you want it. Did you try it? Did it not work? Are you creating the Catalog Task through a workflow?


Greybed
Kilo Explorer

Yeah I tried it this morning but no didn't bring any information through.

Yes I am creating the Cat Task through a Workflow...

Sorry if not making any sense hard to explain 🙂