Nilesh Pol
Kilo Sage

@Community Alums Yes, you can display the latest approval comments on the task list view in ServiceNow, but it requires a bit of configuration since this data comes from the related sysapproval_approver table, not directly from the task itself.

Create a new field on the task table (e.g., Latest Approval Comment).

 

  • Type: String

  • Mark it as Calculated.

    • Use this calculated script:

var comment = '';
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.orderByDesc('sys_updated_on');
gr.setLimit(1);
gr.query();
if (gr.next()) {
comment = gr.comments;
}
answer = comment;

finally, Add this field to your list layout in the list view.

 

View solution in original post