web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is there a way to filt...
Power Automate
Unanswered

Is there a way to filter a SharePoint List by items with comments?

(0) ShareShare
ReportReport
Posted on by 4

Using MS Lists I want to add an ability to filter items that have comments. I have no coding experience but any help would be appreciated. I have access to PowerAutomate but would need guidance on how to accomplish this if I need to go that route.

PAJenRed_0-1715785027104.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @PAJenRed,

     

    You can use the _CommentCount field in a HTTP request. That field does not seem to be available in normal actions. However, you can workaround that by using the RenderListDataAsStream method.

     

    Below is an example

     

    URI

    _api/web/lists/getbytitle('@{variables('ListName')}')/RenderListDataAsStream?View=@{variables('ViewID')}&FilterField1=_CommentCount&FilterOp1=Geq&FilterValue1=1

     

    Body

    {"parameters":{"__metadata":{"type":"SP.RenderListDataParameters"},"RenderOptions":1463815,"AddRequiredFields":true,"RequireFolderColoringFields":true}}

     

    filtercommentcount.png

  • PAJenRed Profile Picture
    4 on at

    Is this intended to create a new view that is filtered to only those with comments? My goal is to add a column that we can then filter on, not create a new view.

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @PAJenRed,

     

    No, it is using an existing view of my list. In my example the All Items view. I stored the id of that view in a variable.

     

    With the RenderListDataAsStream method it will return the _CommentCount column for that existing view. With the FilterField1, FilterOp1 & FilterValue1 parameters you can filter directly in the query.

  • PAJenRed Profile Picture
    4 on at

    Here is how I have this built.  Does it appear to be correct?  Where should I be able to see the counts that we will then be able to filter on within the LISTS UI?

    PAJenRed_0-1716231139807.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard