Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Journal field in notification

Dan Brown2
Kilo Sage

Hello,

I have set it up on a notification to add the latest Journal Input field entry.   This is working fine, but I have been asked if I can remove the date and field name from the notification too.   So the text underlined below.   Can this be done?   Cheers.

31-01-2017 12:17 GMT - Dan Brown (Comments Visible to User)

Hello All,

This is an email,

Dan

1 ACCEPTED SOLUTION

shuguang2
Kilo Expert

below is the script we used



<mail_script>


//get the latest journal entry


var mgnt = current.u_notification_history.getJournalEntry(1);


//remove header information


var pat = /.*/;


template.print(mgnt.replace(pat,""));


</mail_script>



Hope this helps


View solution in original post

2 REPLIES 2

shuguang2
Kilo Expert

below is the script we used



<mail_script>


//get the latest journal entry


var mgnt = current.u_notification_history.getJournalEntry(1);


//remove header information


var pat = /.*/;


template.print(mgnt.replace(pat,""));


</mail_script>



Hope this helps


Thank you - perfect.



Dan