This article is for Data Center. Visit Cloud

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Show the date, author, and text of the latest comment

comments.UMAX_BY($.created).map(CONCAT(
	$.author.user_display_name(),
	" said at ",
	FORMAT_DATETIME($.created, "yyyy-MM-dd HH:mm:ss"),
	": ", $.body))

Show the last comment made by a user

comments.FILTER($.author = "admin").UMAX_BY($.created)

In this example, the last comment made by "admin" will be shown. To show comments for another user, replace "admin" accordingly.

Show the date of the latest comment done by a user

comments.filter(x -> x.author = "admin").map(x -> x.created).max()

In this example, the date corresponds to the last comment made by "admin." To show the date for another user, replace "admin" accordingly.

Display "Answered" if there are comments after my latest one

WITH myLastCommentDate = comments.FILTER($.author = me()).MAP($.created).MAX() :
   IF (comments.ANY($.created > myLastCommentDate); "Answered")
  • No labels