2

Is there any way to get number of views count for each post in discussion board in SharePoint out of the box? or is there any custom code sample to achieve the same?

I know Popularity trend is there, but not that much useful to check every post in discussion board.

Please let me know any feasible way to achieve it..

1
  • I found some similar Questions, take a look at this one and this other one. Also try browsing through the 'Usage-Counters' tag in the menu, this seems to be the term used on this site for what you are trying to implement. I saw an item-view somewhere too, which is what you ask for.
    – Tally
    Feb 6, 2018 at 12:03

1 Answer 1

2

You can access the data via a rest call to the search service:

http://sp/_api/search/query?querytext='path:"http://sp/Lists/DiscussionBoard"'&rowlimit=100&sortlist='viewsrecent:descending'

In the results of the REST call, look for the ViewsRecent and ViewsLifetime fields.

2
  • Hi, Thank you for your solution. I'm getting values for ViewsRecent and ViewsLifetime. Can you please elaborate more on these two terms? What is the meaning on each? Feb 7, 2018 at 8:34
  • Hi, I found the answer. "ViewsLifeTime" : shows the hit count from the first day a usage event was recorded. The "ViewsRecent" shows the hit count for the last 14 days by default. Feb 7, 2018 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.