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.

set dynamic short description for catalog task.

XYZ
Tera Contributor

Hello, 

I need help to set the catalog task short description dynamically my workflow is attached to more than one catalog item so whatever i set in the short description is getting set for all ,so how i can make it dynamically .

The catalog task short description should be ,procure the <catalog item name> for <requested for > delivery may take time based on the availability of service engineer.find_real_file.png

Thanx,

1 ACCEPTED SOLUTION

Gaurav Shirsat
Mega Sage

Hello

Open Your Catalog Task and the script section of your catalog task just write the script,

task.short_description = 'Procure the' +' '+current.cat_item.getDisplayValue() + ' for' + current.variables.<requested for variable back end name>+' '+' delivery may take time based on the availability of service engineer.'

Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat

View solution in original post

3 REPLIES 3

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Withiin the script of the Catalog Task, you can use:

task.short_description = 'Something goes here ' + current.variables.your_variable.getDisplayValue();

With this you should be able to create any format you'd like.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Or exactly your sentence:

task.short_description = 'Procure the ' + current.cat_item.getDisplayValue() + ' for ' + current.variables.requested_for.getDisplayValue() + ' delivery may take time based on the availability of service engineer.';

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Gaurav Shirsat
Mega Sage

Hello

Open Your Catalog Task and the script section of your catalog task just write the script,

task.short_description = 'Procure the' +' '+current.cat_item.getDisplayValue() + ' for' + current.variables.<requested for variable back end name>+' '+' delivery may take time based on the availability of service engineer.'

Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat