Include only the last journal entry on a report

Nickels
Tera Expert

I have a request to include either the last work note or last additional comment on a list report. I know how to include the last journal entry within notifications but I am not seeing a way to do this on a report.   Any advice would be appreciated.

Thanks

-Chris

1 ACCEPTED SOLUTION

Thank you for the clarification. I was able to reproduce this (given some more sample data.)



The only way I can see that you can do this is to have a secondary u_comments (string) field and a business rule that maintains it. Something like



current.u_comments = current.comments.getJournalEntry(1);



This gets the latest entry and overwrites what ever is in the u_comments field. Use that on your report and you should be good.


View solution in original post

13 REPLIES 13

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Chris,



You may find below thread helpful.


Report on last additional comment


Chuck Tomasi
Tera Patron

Hi Chris,



Simply adding the field to the list should do the trick.



find_real_file.png


This doesn't restrict to the last comment, but pulls through all comments!



I ended up with a hundred pages report when I tried this!


Interesting, I've never seen it do that. What release of ServiceNow are you using?



Is this a standard table (e.g Incident)?