How to get the record producer name in the short description of the task

vince_france
Tera Contributor

Hello to all !

I'm looking for the best way to send tasks like Change, HR_Case or Incident,

from a record producer,

with the name of the record producer in the short_description.

For example :

find_real_file.png>>>find_real_file.png

Nothing found in the wiki,

I'm sure you've did this before, can you give me some advice ?

Thank you !

1 ACCEPTED SOLUTION

deepakgarg
ServiceNow Employee
ServiceNow Employee

Hi Vincent,



One easy way to achieve this would be:


Create a variable on Record producer(name: short_description), as follows:



Screen Shot 2016-09-10 at 12.18.04 PM.pngScreen Shot 2016-09-10 at 9.50.12 AM.png


Dont forget to add Default value as: javascript:current.cat_item


And you're done.


Screen Shot 2016-09-10 at 12.22.29 PM.png


Now, if you want, you can write a Catalog UI policy to hide the variable 'short_description' containing the name of the Record producer, as:



Screen Shot 2016-09-10 at 12.40.06 PM.pngScreen Shot 2016-09-10 at 12.40.20 PM.png



Thanks,
Deepak.


PS: Hit like, Helpful or Correct depending on the impact of the response.


View solution in original post

9 REPLIES 9

Michael Fry1
Kilo Patron

In the script area of the record producer, you can add:


current.short_description = 'name of producer goes here';

Thank you Micheal,


I'm precisely looking for a script like this one,


I'd like to get the reference of my task.name to have the same script for every record producer without writing manually its name.


Do you have any advide ?


Vince.


kiara1
Tera Expert

Hi Vincent,



When you are creating HR0001082 or any task in this table, do you have any field   on the form that specifies that this HR task was created by the record producer, not manually by service desk/Admin/HR team?   If yes, then you can create a business rule (after), and use scripting to add the name of record producer using that field.


Thank you Kunpriya !


I have not look after a BR yet.


How can I implement your idea ?


Thank.