How to display latest short description of RITM in notification

B somanna
Tera Contributor

Hi Team, 

I have created a notification on sc_req_item table and in email script i have given to print current.short_descripton.

 I need the short description of RITM to be visible on notification.

But when i create request , given short description as 'Test' for RITM , sometimes i see default short description  RITM and somtimes as 'Test'  its not constant in notification 

Pls refer the below img.

Here in RITM form default text is overridden by 'TEST '

Bsomanna_0-1675668457093.png

 

but in email notification its giving default one

Bsomanna_1-1675668628629.png

here is a email script code

Bsomanna_2-1675668822362.png

How to make short description as given by end user while requesting?

 

Thanks

 

 

14 REPLIES 14

Martin Ivanov
Giga Sage
Giga Sage

If you take a closer look at your activity log - you will see: Test, was Format...

So, it means that the ritm is inserted with the default short description and then change to the one provided by the user.

You are experiencing inconsistent behaviour because sometimes the email firing is hapening between the insert with the default value and the replacement. Sometimes you get it right, because the node, processing the notification may be busy and fire after the value is replaced.

 

An option can be to try to slow down the notification somehow, OR, read the ritm Variable where you insert Test, instead of the short description field itself.

 


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

could you please tell me how do we slow down sending notification ?

Ankur Bawiskar
Tera Patron
Tera Patron

@B somanna 

are you having some variable to hold the short description entered by user?

if yes then why not print that directly?

current.variables.variableName;

If not then from which script is RITM short description getting populated? you need to debug this

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