Add catalog task description through workflow advanced script

Joshuu
Kilo Sage

Hi All,

 

I want to add below lines in the catalog task description by using advanced script in catalog task activity.

 

1. Validate approval.
2. If a spot buy, create and distribute PO to Vendor.
3. Add items ordered to Inventory tracking spreadsheet.
4. If spot buy, update inventory tracking spreadsheet..
5. If spot buy, Mark PO as received.

 

Please assist.

 

Thank you.

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Joshuu I am assuming you would like to set description on the catalog task via the work flow SC Task activity.

 

Here is how you can do it.

Screenshot 2023-04-28 at 5.07.14 PM.png

 

Here is the script.

task.description = ' 1. Validate approval.\n 2. If a spot buy, create and distribute PO to Vendor.\n 3. Add items ordered to Inventory tracking spreadsheet.\n 4. If spot buy, update inventory tracking spreadsheet..\n 5. If spot buy, Mark PO as received.';

Hope this helps. 

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Joshuu 

so what does that mean?

what script did you start and where are you stuck?
with the above information we cannot help much

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Joshuu 

It could have been better you starting the script from your side so that it will be learning for you as well.

Getting direct answers may not help you in long term for development skills.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Thank you.

And I just found that we can even add the text in the instructions field in the catalog task activity so that it will be populated in the description filed without any script.

 

priyarao_0-1682683698529.png

 

 

Thanks.

Hi @Ankur Bawiskar 

 

Thanks for the response, got the solution from @Sandeep Rajput . Just want to add the description through advanced script activity in the workflow.