Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Comments shows in ascending order in portal for idea table

RiyasA685076547
Tera Contributor

Hi All,

 

In idea table the comments section shows in ascending order, whereas for incident/request the comments shows in descending order. 

How to make the comments to display latest on top and oldest in bottom.

In idea table cf_comments widget uses the tag as below

<cf-comment-panel comment-props="data.commentProps" logged-in-user="data.loggedInUserInfo" comment="commentObj" child-comment-editor-config="childCommentEditorConfig" edit-comment-config="commentEditModeConfig" messages="data.messages"></cf-comment-panel>

 

Thanks,

2 REPLIES 2

Mark Manders
Tera Patron

Be aware that posting the same question multiple times is against the Community Code of Conduct and could get you banned.
https://www.servicenow.com/community/spm-forum/how-to-display-the-comments-of-idea-in-descending-ord...


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

RiyasA685076547
Tera Contributor

Add the ".reverse()" in the end of the attribute comment-props="data.commentProps"

<cf-comment-panel comment-props="data.commentProps.reverse()" logged-in-user="data.loggedInUserInfo" comment="commentObj" child-comment-editor-config="childCommentEditorConfig" edit-comment-config="commentEditModeConfig" messages="data.messages"></cf-comment-panel>