How to populate the Short Description from the Catalog Item to a Catalog Task Short Description.

Tony Williams1
Mega Guru

Currently, the "Short Description" field on the Catalog Task is being populated via the workflow Activity.

TonyWilliams1_0-1682957899152.png

The problem is, if I use the same workflow for multiple Catalog Items the Short descriptions are all the same.

 

How can I have the Short description in the Catalog Task match the short description from the Catalog Item as it does for the RITM short description?

 

1 ACCEPTED SOLUTION

Tony Williams1
Mega Guru

That was it!  thanks for your patients.

 

View solution in original post

9 REPLIES 9

DrewW
Mega Sage
Mega Sage

When you set the short description in the workflow set it via script and use current.cat_item.short_description.

So your script will be something like

 

task.setValue("short_description", current.cat_item.short_description);

 

The suggested script task.setValue"short_description", current.cat_item.short_description; didn't work.

 

The Task still shows the default Short description from my Workflow Screenshot above.

Ok well posting a screen shot of all of the selections you have made would help in troubleshooting it.  Along with the whole script.  Also the code you posted is missing the needed ( and ).  Is that really how it is or did it copy/paste incorrectly.

Sorry for the late reply.  I'll be honest, I don't do much scripting.

Below is how it is currently set up.

TonyWilliams1_0-1683036477006.png

This is how the Advanced default script is set up.

TonyWilliams1_1-1683036534704.png

This is how I added the script you provided.

TonyWilliams1_2-1683036776768.png

 

What I am trying to achieve is, Getting the RITM Item field to populate the Short description field of the Catalog Task.

RITM Item field.

TonyWilliams1_3-1683037103632.png

Service Catalog Short description.

TonyWilliams1_4-1683037178002.png

As you can see, it populates the Task Variable from my workflow.

TonyWilliams1_5-1683037278148.png