In email script, I need to get RITM number from short description and place it in a new line.

rajadinesh
Giga Contributor

In email script, I need to get RITM number from short description(see below screen shot) and place it in a new line. How can I achieve this. Tried with substring(see Mail Script) but not working. Please help

find_real_file.png

Mail Script:

find_real_file.png

1 ACCEPTED SOLUTION

Hi Rajadinesh,

Find the below: 

1. Email Script:

find_real_file.png

2. Notification body:

find_real_file.png

 

3. Preview of the notification:

find_real_file.png

4. Incident I used to preview:

find_real_file.png

 I have tested it .. I am able to get the RITM number from short description. Check it again...and do as per the above.

 

 

Mark it correct if worked for u as well so that it will be helpful to others as well..!

 

Regards,

Snehal M

View solution in original post

5 REPLIES 5

VigneshMC
Mega Sage

if you are sending notification in catalog task table, then you dont need mail script

just add in notification directly (same works in mail script as well)

current.request_item.getDisplayValue();

Snehal2
Kilo Guru

Hi Rajadinesh,

 

Try out the following mail script:

var description= < store the short description value in this description field >
var descriptioncontent = [];
descriptioncontent = comment.split("-");   //  split it by " - "
template.print(descriptioncontent[0]);   // it will contain the RITM in array[0]

Mark it correct if worked for u as well so that it will be helpful to others as well..!

 

Regards,

Snehal M

No. it is not working

Hi Rajadinesh,

Find the below: 

1. Email Script:

find_real_file.png

2. Notification body:

find_real_file.png

 

3. Preview of the notification:

find_real_file.png

4. Incident I used to preview:

find_real_file.png

 I have tested it .. I am able to get the RITM number from short description. Check it again...and do as per the above.

 

 

Mark it correct if worked for u as well so that it will be helpful to others as well..!

 

Regards,

Snehal M