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

Omkar Mone
Mega Sage

Hi 

Can you try this once ?

var description = gs.getMessage('${short_description});
template.print(description.substring(0,11)+"<br>");
template.print(description.substring(12 , description.length));

 

The reason behind this is , the message that you are getting from messages, you are printing that ony. now template.print will return true or false. so try the above thing.

 

Regards,

Omkar Mone.