Joined dataview list count based on filter - sharepoint 2010

I have a DataView Webpart that displays a set of list items (articles). In each item(article) being displayed, I want to show a counter of items from another list that are linked to the unique ID of the first list. My second list consists of comments. Essentially I want to have a comment counter per article.

Thank you in advance for your answers
bsmcyAsked:
Who is Participating?
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Connect With a Mentor Microsoft MVP ExcelCommented:
Hello,

you need to add a column to your main list, which needs to be a Lookup type. Point it to your Comments list and in the column selection drop-down choose the option with "Count related" in brackets. Then build that column into your DVWP.

cheers, teylyn
0
 
quihongCommented:
One possible solution would be to have a Workflow on your Comments list, update a counter on your Article list whenever a comment is made.
0
 
quihongCommented:
Wow!

Give it up to Teylyn!!! I didn't even know that option existed!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.