I have tried both CAML
query and REST API
to retrieve data from the Discussions List in the community site but I am unable to accesss the Replies
column.
How to access this column and sort data?
Please help.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityTo get the list of replies
_api/lists/getByTitle('listname')/items?$filter=ContentType eq 'Message'
or
/_api/lists/getByTitle('listname')/items?$filter=FSObjType eq 0
To get the list of Discussions with the replies count:
/_api/lists/getByTitle('listname')/items?$select=ID,Title,Body,Folder/ItemCount &$expand=Folder/ItemCount &$filter=ContentType eq 'Discussion'